Skip to content

Commit 351409a

Browse files
author
Jorge Aparicio
committed
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
1 parent 8c5bb80 commit 351409a

File tree

231 files changed

+1115
-1115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+1115
-1115
lines changed

src/compiletest/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt;
1313
use std::str::FromStr;
1414
use regex::Regex;
1515

16-
#[deriving(Clone, PartialEq)]
16+
#[derive(Clone, PartialEq)]
1717
pub enum Mode {
1818
CompileFail,
1919
RunFail,
@@ -59,7 +59,7 @@ impl fmt::Show for Mode {
5959
}
6060
}
6161

62-
#[deriving(Clone)]
62+
#[derive(Clone)]
6363
pub struct Config {
6464
// The library paths required for running the compiler
6565
pub compile_lib_path: String,

src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct ExpectedError {
3030
pub static EXPECTED_PATTERN : &'static str =
3131
r"//~(?P<follow>\|)?(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";
3232

33-
#[deriving(PartialEq, Show)]
33+
#[derive(PartialEq, Show)]
3434
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
3535

3636
// Load any test directives embedded in the file

src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,6 @@ mod tests {
800800
}
801801

802802
// Make sure deriving works with Arc<T>
803-
#[deriving(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Default)]
803+
#[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Default)]
804804
struct Foo { inner: Arc<int> }
805805
}

src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use std::rt::heap::{allocate, deallocate};
4646
// The way arena uses arrays is really deeply awful. The arrays are
4747
// allocated, and have capacities reserved, but the fill for the array
4848
// will always stay at 0.
49-
#[deriving(Clone, PartialEq)]
49+
#[derive(Clone, PartialEq)]
5050
struct Chunk {
5151
data: Rc<RefCell<Vec<u8>>>,
5252
fill: Cell<uint>,

src/libcollections/binary_heap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! use std::collections::BinaryHeap;
3131
//! use std::uint;
3232
//!
33-
//! #[deriving(Copy, Eq, PartialEq)]
33+
//! #[derive(Copy, Eq, PartialEq)]
3434
//! struct State {
3535
//! cost: uint,
3636
//! position: uint,
@@ -162,7 +162,7 @@ use vec::{self, Vec};
162162
/// A priority queue implemented with a binary heap.
163163
///
164164
/// This will be a max-heap.
165-
#[deriving(Clone)]
165+
#[derive(Clone)]
166166
#[stable]
167167
pub struct BinaryHeap<T> {
168168
data: Vec<T>,
@@ -565,7 +565,7 @@ pub struct Iter <'a, T: 'a> {
565565
iter: slice::Iter<'a, T>,
566566
}
567567

568-
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
568+
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
569569
impl<'a, T> Clone for Iter<'a, T> {
570570
fn clone(&self) -> Iter<'a, T> {
571571
Iter { iter: self.iter.clone() }

src/libcollections/bit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ impl cmp::Eq for Bitv {}
10401040

10411041
/// An iterator for `Bitv`.
10421042
#[stable]
1043-
#[deriving(Clone)]
1043+
#[derive(Clone)]
10441044
pub struct Iter<'a> {
10451045
bitv: &'a Bitv,
10461046
next_idx: uint,
@@ -1139,7 +1139,7 @@ impl<'a> RandomAccessIterator for Iter<'a> {
11391139
/// let bv: Bitv = s.into_bitv();
11401140
/// assert!(bv[3]);
11411141
/// ```
1142-
#[deriving(Clone)]
1142+
#[derive(Clone)]
11431143
#[stable]
11441144
pub struct BitvSet {
11451145
bitv: Bitv,
@@ -1784,15 +1784,15 @@ impl<S: hash::Writer> hash::Hash<S> for BitvSet {
17841784
}
17851785

17861786
/// An iterator for `BitvSet`.
1787-
#[deriving(Clone)]
1787+
#[derive(Clone)]
17881788
#[stable]
17891789
pub struct SetIter<'a> {
17901790
set: &'a BitvSet,
17911791
next_idx: uint
17921792
}
17931793

17941794
/// An iterator combining two `BitvSet` iterators.
1795-
#[deriving(Clone)]
1795+
#[derive(Clone)]
17961796
struct TwoBitPositions<'a> {
17971797
set: &'a BitvSet,
17981798
other: &'a BitvSet,

src/libcollections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ use super::node::{self, Node, Found, GoDown};
8181
/// force this degenerate behaviour to occur on every operation. While the total amount of work
8282
/// done on each operation isn't *catastrophic*, and *is* still bounded by O(B log<sub>B</sub>n),
8383
/// it is certainly much slower when it does.
84-
#[deriving(Clone)]
84+
#[derive(Clone)]
8585
#[stable]
8686
pub struct BTreeMap<K, V> {
8787
root: Node<K, V>,

src/libcollections/btree/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ impl<K: Clone, V: Clone> Clone for Node<K, V> {
496496
/// println!("Uninitialized memory: {}", handle.into_kv());
497497
/// }
498498
/// ```
499-
#[deriving(Copy)]
499+
#[derive(Copy)]
500500
pub struct Handle<NodeRef, Type, NodeType> {
501501
node: NodeRef,
502502
index: uint

src/libcollections/btree/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use btree_map::{BTreeMap, Keys};
3030
///
3131
/// See BTreeMap's documentation for a detailed discussion of this collection's performance
3232
/// benefits and drawbacks.
33-
#[deriving(Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
33+
#[derive(Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
3434
#[stable]
3535
pub struct BTreeSet<T>{
3636
map: BTreeMap<T, ()>,

src/libcollections/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub struct IterMut<'a, T:'a> {
8484
}
8585

8686
/// An iterator over mutable references to the items of a `DList`.
87-
#[deriving(Clone)]
87+
#[derive(Clone)]
8888
#[stable]
8989
pub struct IntoIter<T> {
9090
list: DList<T>

src/libcollections/enum_set.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use core::ops::{Sub, BitOr, BitAnd, BitXor};
2121

2222
// FIXME(contentions): implement union family of methods? (general design may be wrong here)
2323

24-
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
24+
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2525
/// A specialized set implementation to use enum types.
2626
pub struct EnumSet<E> {
2727
// We must maintain the invariant that no bits are set
@@ -223,7 +223,7 @@ pub struct Iter<E> {
223223
bits: uint,
224224
}
225225

226-
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
226+
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
227227
impl<E> Clone for Iter<E> {
228228
fn clone(&self) -> Iter<E> {
229229
Iter {
@@ -287,7 +287,7 @@ mod test {
287287

288288
use super::{EnumSet, CLike};
289289

290-
#[deriving(Copy, PartialEq, Show)]
290+
#[derive(Copy, PartialEq, Show)]
291291
#[repr(uint)]
292292
enum Foo {
293293
A, B, C
@@ -491,7 +491,7 @@ mod test {
491491
#[should_fail]
492492
fn test_overflow() {
493493
#[allow(dead_code)]
494-
#[deriving(Copy)]
494+
#[derive(Copy)]
495495
#[repr(uint)]
496496
enum Bar {
497497
V00, V01, V02, V03, V04, V05, V06, V07, V08, V09,

src/libcollections/ring_buf.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ pub struct Iter<'a, T:'a> {
11391139
head: uint
11401140
}
11411141

1142-
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
1142+
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
11431143
impl<'a, T> Clone for Iter<'a, T> {
11441144
fn clone(&self) -> Iter<'a, T> {
11451145
Iter {
@@ -1674,21 +1674,21 @@ mod tests {
16741674
})
16751675
}
16761676

1677-
#[deriving(Clone, PartialEq, Show)]
1677+
#[derive(Clone, PartialEq, Show)]
16781678
enum Taggy {
16791679
One(int),
16801680
Two(int, int),
16811681
Three(int, int, int),
16821682
}
16831683

1684-
#[deriving(Clone, PartialEq, Show)]
1684+
#[derive(Clone, PartialEq, Show)]
16851685
enum Taggypar<T> {
16861686
Onepar(int),
16871687
Twopar(int, int),
16881688
Threepar(int, int, int),
16891689
}
16901690

1691-
#[deriving(Clone, PartialEq, Show)]
1691+
#[derive(Clone, PartialEq, Show)]
16921692
struct RecCy {
16931693
x: int,
16941694
y: int,

src/libcollections/slice.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ impl<T: Clone, V: AsSlice<T>> SliceConcatExt<T, Vec<T>> for [V] {
10831083
/// The last generated swap is always (0, 1), and it returns the
10841084
/// sequence to its initial order.
10851085
#[experimental]
1086-
#[deriving(Clone)]
1086+
#[derive(Clone)]
10871087
pub struct ElementSwaps {
10881088
sdir: Vec<SizeDirection>,
10891089
/// If `true`, emit the last swap that returns the sequence to initial
@@ -1130,11 +1130,11 @@ impl<T: Clone> ToOwned<Vec<T>> for [T] {
11301130
// Iterators
11311131
////////////////////////////////////////////////////////////////////////////////
11321132

1133-
#[deriving(Copy, Clone)]
1133+
#[derive(Copy, Clone)]
11341134
enum Direction { Pos, Neg }
11351135

11361136
/// An `Index` and `Direction` together.
1137-
#[deriving(Copy, Clone)]
1137+
#[derive(Copy, Clone)]
11381138
struct SizeDirection {
11391139
size: uint,
11401140
dir: Direction,
@@ -2709,7 +2709,7 @@ mod tests {
27092709
assert!(values == [2, 3, 5, 6, 7]);
27102710
}
27112711

2712-
#[deriving(Clone, PartialEq)]
2712+
#[derive(Clone, PartialEq)]
27132713
struct Foo;
27142714

27152715
#[test]

src/libcollections/str.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ fn canonical_sort(comb: &mut [(char, u8)]) {
165165
}
166166
}
167167

168-
#[deriving(Clone)]
168+
#[derive(Clone)]
169169
enum DecompositionType {
170170
Canonical,
171171
Compatible
172172
}
173173

174174
/// External iterator for a string's decomposition's characters.
175175
/// Use with the `std::iter` module.
176-
#[deriving(Clone)]
176+
#[derive(Clone)]
177177
pub struct Decompositions<'a> {
178178
kind: DecompositionType,
179179
iter: Chars<'a>,
@@ -252,7 +252,7 @@ impl<'a> Iterator for Decompositions<'a> {
252252
}
253253
}
254254

255-
#[deriving(Clone)]
255+
#[derive(Clone)]
256256
enum RecompositionState {
257257
Composing,
258258
Purging,
@@ -261,7 +261,7 @@ enum RecompositionState {
261261

262262
/// External iterator for a string's recomposition's characters.
263263
/// Use with the `std::iter` module.
264-
#[deriving(Clone)]
264+
#[derive(Clone)]
265265
pub struct Recompositions<'a> {
266266
iter: Decompositions<'a>,
267267
state: RecompositionState,
@@ -356,7 +356,7 @@ impl<'a> Iterator for Recompositions<'a> {
356356

357357
/// External iterator for a string's UTF16 codeunits.
358358
/// Use with the `std::iter` module.
359-
#[deriving(Clone)]
359+
#[derive(Clone)]
360360
pub struct Utf16Units<'a> {
361361
encoder: Utf16Encoder<Chars<'a>>
362362
}

src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use str::{self, CharRange, FromStr, Utf8Error};
3333
use vec::{DerefVec, Vec, as_vec};
3434

3535
/// A growable string stored as a UTF-8 encoded buffer.
36-
#[deriving(Clone, PartialOrd, Eq, Ord)]
36+
#[derive(Clone, PartialOrd, Eq, Ord)]
3737
#[stable]
3838
pub struct String {
3939
vec: Vec<u8>,

src/libcollections/vec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ impl<T> Vec<T> {
795795
/// let w = v.map_in_place(|i| i + 3);
796796
/// assert_eq!(w.as_slice(), [3, 4, 5].as_slice());
797797
///
798-
/// #[deriving(PartialEq, Show)]
798+
/// #[derive(PartialEq, Show)]
799799
/// struct Newtype(u8);
800800
/// let bytes = vec![0x11, 0x22];
801801
/// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
@@ -2276,7 +2276,7 @@ mod tests {
22762276
#[test]
22772277
fn test_map_in_place_zero_sized() {
22782278
let v = vec![(), ()];
2279-
#[deriving(PartialEq, Show)]
2279+
#[derive(PartialEq, Show)]
22802280
struct ZeroSized;
22812281
assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]);
22822282
}
@@ -2286,11 +2286,11 @@ mod tests {
22862286
use std::sync::atomic;
22872287
use std::sync::atomic::AtomicUint;
22882288

2289-
#[deriving(Clone, PartialEq, Show)]
2289+
#[derive(Clone, PartialEq, Show)]
22902290
struct Nothing;
22912291
impl Drop for Nothing { fn drop(&mut self) { } }
22922292

2293-
#[deriving(Clone, PartialEq, Show)]
2293+
#[derive(Clone, PartialEq, Show)]
22942294
struct ZeroSized;
22952295
impl Drop for ZeroSized {
22962296
fn drop(&mut self) {

src/libcollections/vec_map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ pub struct Iter<'a, V:'a> {
673673
iter: slice::Iter<'a, Option<V>>
674674
}
675675

676-
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
676+
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
677677
impl<'a, V> Clone for Iter<'a, V> {
678678
fn clone(&self) -> Iter<'a, V> {
679679
Iter {
@@ -705,7 +705,7 @@ pub struct Keys<'a, V: 'a> {
705705
iter: Map<(uint, &'a V), uint, Iter<'a, V>, fn((uint, &'a V)) -> uint>
706706
}
707707

708-
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
708+
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
709709
impl<'a, V> Clone for Keys<'a, V> {
710710
fn clone(&self) -> Keys<'a, V> {
711711
Keys {
@@ -720,7 +720,7 @@ pub struct Values<'a, V: 'a> {
720720
iter: Map<(uint, &'a V), &'a V, Iter<'a, V>, fn((uint, &'a V)) -> &'a V>
721721
}
722722

723-
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
723+
// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
724724
impl<'a, V> Clone for Values<'a, V> {
725725
fn clone(&self) -> Values<'a, V> {
726726
Values {

src/libcore/atomic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ unsafe impl<T> Sync for AtomicPtr<T> {}
6262
/// Rust's memory orderings are [the same as
6363
/// C++'s](http://gcc.gnu.org/wiki/Atomic/GCCMM/AtomicSync).
6464
#[stable]
65-
#[deriving(Copy)]
65+
#[derive(Copy)]
6666
pub enum Ordering {
6767
/// No ordering constraints, only atomic operations.
6868
#[stable]

src/libcore/char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ impl Char for char {
430430

431431
/// An iterator over the characters that represent a `char`, as escaped by
432432
/// Rust's unicode escaping rules.
433-
#[deriving(Clone)]
433+
#[derive(Clone)]
434434
pub struct EscapeUnicode {
435435
c: char,
436436
state: EscapeUnicodeState
437437
}
438438

439-
#[deriving(Clone)]
439+
#[derive(Clone)]
440440
enum EscapeUnicodeState {
441441
Backslash,
442442
Type,
@@ -490,12 +490,12 @@ impl Iterator for EscapeUnicode {
490490

491491
/// An iterator over the characters that represent a `char`, escaped
492492
/// for maximum portability.
493-
#[deriving(Clone)]
493+
#[derive(Clone)]
494494
pub struct EscapeDefault {
495495
state: EscapeDefaultState
496496
}
497497

498-
#[deriving(Clone)]
498+
#[derive(Clone)]
499499
enum EscapeDefaultState {
500500
Backslash(char),
501501
Char(char),

0 commit comments

Comments
 (0)