]> git.lizzy.rs Git - rust.git/commitdiff
sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs
authorJorge Aparicio <japaricious@gmail.com>
Sun, 4 Jan 2015 03:54:18 +0000 (22:54 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sun, 4 Jan 2015 03:54:18 +0000 (22:54 -0500)
231 files changed:
src/compiletest/common.rs
src/compiletest/errors.rs
src/liballoc/arc.rs
src/libarena/lib.rs
src/libcollections/binary_heap.rs
src/libcollections/bit.rs
src/libcollections/btree/map.rs
src/libcollections/btree/node.rs
src/libcollections/btree/set.rs
src/libcollections/dlist.rs
src/libcollections/enum_set.rs
src/libcollections/ring_buf.rs
src/libcollections/slice.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/libcollections/vec.rs
src/libcollections/vec_map.rs
src/libcore/atomic.rs
src/libcore/char.rs
src/libcore/cmp.rs
src/libcore/default.rs
src/libcore/fmt/mod.rs
src/libcore/fmt/num.rs
src/libcore/fmt/rt.rs
src/libcore/hash/mod.rs
src/libcore/hash/sip.rs
src/libcore/intrinsics.rs
src/libcore/iter.rs
src/libcore/kinds.rs
src/libcore/nonzero.rs
src/libcore/num/mod.rs
src/libcore/ops.rs
src/libcore/option.rs
src/libcore/raw.rs
src/libcore/result.rs
src/libcore/simd.rs
src/libcore/slice.rs
src/libcore/str/mod.rs
src/libcoretest/any.rs
src/libfmt_macros/lib.rs
src/libgetopts/lib.rs
src/libgraphviz/lib.rs
src/liblibc/lib.rs
src/liblog/directive.rs
src/liblog/lib.rs
src/librand/chacha.rs
src/librand/distributions/exponential.rs
src/librand/distributions/mod.rs
src/librand/distributions/normal.rs
src/librand/isaac.rs
src/librand/reseeding.rs
src/librbml/lib.rs
src/libregex/compile.rs
src/libregex/parse.rs
src/libregex/re.rs
src/libregex/vm.rs
src/librustc/lint/builtin.rs
src/librustc/lint/mod.rs
src/librustc/metadata/common.rs
src/librustc/metadata/csearch.rs
src/librustc/metadata/cstore.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/metadata/tydecode.rs
src/librustc/middle/cfg/construct.rs
src/librustc/middle/cfg/mod.rs
src/librustc/middle/check_loop.rs
src/librustc/middle/check_match.rs
src/librustc/middle/check_static.rs
src/librustc/middle/const_eval.rs
src/librustc/middle/dataflow.rs
src/librustc/middle/def.rs
src/librustc/middle/effect.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/fast_reject.rs
src/librustc/middle/graph.rs
src/librustc/middle/infer/combine.rs
src/librustc/middle/infer/mod.rs
src/librustc/middle/infer/region_inference/graphviz.rs
src/librustc/middle/infer/region_inference/mod.rs
src/librustc/middle/infer/type_variable.rs
src/librustc/middle/infer/unify.rs
src/librustc/middle/lang_items.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/privacy.rs
src/librustc/middle/region.rs
src/librustc/middle/resolve_lifetime.rs
src/librustc/middle/subst.rs
src/librustc/middle/traits/mod.rs
src/librustc/middle/traits/object_safety.rs
src/librustc/middle/traits/project.rs
src/librustc/middle/traits/select.rs
src/librustc/middle/ty.rs
src/librustc/session/config.rs
src/librustc/session/search_paths.rs
src/librustc/util/common.rs
src/librustc/util/nodemap.rs
src/librustc/util/snapshot_vec.rs
src/librustc_back/svh.rs
src/librustc_back/target/mod.rs
src/librustc_borrowck/borrowck/check_loans.rs
src/librustc_borrowck/borrowck/fragments.rs
src/librustc_borrowck/borrowck/gather_loans/move_error.rs
src/librustc_borrowck/borrowck/gather_loans/restrictions.rs
src/librustc_borrowck/borrowck/mod.rs
src/librustc_borrowck/borrowck/move_data.rs
src/librustc_borrowck/graphviz.rs
src/librustc_driver/pretty.rs
src/librustc_llvm/diagnostic.rs
src/librustc_llvm/lib.rs
src/librustc_resolve/build_reduced_graph.rs
src/librustc_resolve/lib.rs
src/librustc_trans/back/write.rs
src/librustc_trans/save/recorder.rs
src/librustc_trans/save/span_utils.rs
src/librustc_trans/trans/_match.rs
src/librustc_trans/trans/adt.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/basic_block.rs
src/librustc_trans/trans/cabi.rs
src/librustc_trans/trans/cabi_x86_64.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/cleanup.rs
src/librustc_trans/trans/closure.rs
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/datum.rs
src/librustc_trans/trans/debuginfo.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/mod.rs
src/librustc_trans/trans/monomorphize.rs
src/librustc_trans/trans/tvec.rs
src/librustc_trans/trans/type_.rs
src/librustc_trans/trans/type_of.rs
src/librustc_trans/trans/value.rs
src/librustc_typeck/check/method/mod.rs
src/librustc_typeck/check/method/probe.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/writeback.rs
src/librustc_typeck/rscope.rs
src/librustc_typeck/variance.rs
src/librustdoc/clean/mod.rs
src/librustdoc/doctree.rs
src/librustdoc/externalfiles.rs
src/librustdoc/html/format.rs
src/librustdoc/html/item_type.rs
src/librustdoc/html/layout.rs
src/librustdoc/html/markdown.rs
src/librustdoc/html/render.rs
src/librustdoc/html/toc.rs
src/librustdoc/stability_summary.rs
src/libserialize/base64.rs
src/libserialize/hex.rs
src/libserialize/json.rs
src/libstd/bitflags.rs
src/libstd/c_str.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs
src/libstd/collections/hash/table.rs
src/libstd/dynamic_lib.rs
src/libstd/hash.rs
src/libstd/io/buffered.rs
src/libstd/io/fs.rs
src/libstd/io/mem.rs
src/libstd/io/mod.rs
src/libstd/io/net/addrinfo.rs
src/libstd/io/net/ip.rs
src/libstd/io/process.rs
src/libstd/io/stdio.rs
src/libstd/io/util.rs
src/libstd/num/mod.rs
src/libstd/num/strconv.rs
src/libstd/os.rs
src/libstd/path/posix.rs
src/libstd/path/windows.rs
src/libstd/rand/mod.rs
src/libstd/rt/libunwind.rs
src/libstd/rt/unwind.rs
src/libstd/sync/mpsc/blocking.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/mpsc/select.rs
src/libstd/sync/mpsc/sync.rs
src/libstd/sys/common/net.rs
src/libstd/thread.rs
src/libstd/thread_local/mod.rs
src/libstd/time/duration.rs
src/libsyntax/abi.rs
src/libsyntax/ast.rs
src/libsyntax/ast_map/blocks.rs
src/libsyntax/ast_map/mod.rs
src/libsyntax/ast_util.rs
src/libsyntax/attr.rs
src/libsyntax/codemap.rs
src/libsyntax/diagnostic.rs
src/libsyntax/ext/base.rs
src/libsyntax/ext/deriving/cmp/ord.rs
src/libsyntax/ext/deriving/decodable.rs
src/libsyntax/ext/deriving/encodable.rs
src/libsyntax/ext/deriving/generic/mod.rs
src/libsyntax/ext/deriving/generic/ty.rs
src/libsyntax/ext/deriving/hash.rs
src/libsyntax/ext/deriving/show.rs
src/libsyntax/ext/expand.rs
src/libsyntax/ext/format.rs
src/libsyntax/ext/mtwt.rs
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/ext/tt/transcribe.rs
src/libsyntax/feature_gate.rs
src/libsyntax/owned_slice.rs
src/libsyntax/parse/lexer/comments.rs
src/libsyntax/parse/lexer/mod.rs
src/libsyntax/parse/obsolete.rs
src/libsyntax/parse/parser.rs
src/libsyntax/parse/token.rs
src/libsyntax/print/pp.rs
src/libsyntax/print/pprust.rs
src/libsyntax/test.rs
src/libsyntax/util/interner.rs
src/libsyntax/visit.rs
src/libterm/lib.rs
src/libterm/terminfo/mod.rs
src/libterm/terminfo/parm.rs
src/libtest/lib.rs
src/libtest/stats.rs
src/libtime/lib.rs
src/libunicode/lib.rs
src/libunicode/tables.rs
src/libunicode/u_str.rs
src/test/run-pass/associated-types-binding-in-where-clause.rs
src/test/run-pass/associated-types-return.rs

index 62b757529dc9f46c6781f14fedae18ec45f636e7..202a87fcdc9e7516406af1dd48639b954314ad19 100644 (file)
@@ -13,7 +13,7 @@
 use std::str::FromStr;
 use regex::Regex;
 
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub enum Mode {
     CompileFail,
     RunFail,
@@ -59,7 +59,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Config {
     // The library paths required for running the compiler
     pub compile_lib_path: String,
index 16c6f7250306d96a82630b7bf9a839c1eaaa6180..f330bb3143eaba2a29c7af5892c2da410209b7b7 100644 (file)
@@ -30,7 +30,7 @@ pub struct ExpectedError {
 pub static EXPECTED_PATTERN : &'static str =
     r"//~(?P<follow>\|)?(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";
 
-#[deriving(PartialEq, Show)]
+#[derive(PartialEq, Show)]
 enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
 
 // Load any test directives embedded in the file
index e00f4c45017fe2c8cdc0143cb6f77c8741ada050..0a81418334674597bb9da33c02674bbdc5ad352d 100644 (file)
@@ -800,6 +800,6 @@ fn show_arc() {
     }
 
     // Make sure deriving works with Arc<T>
-    #[deriving(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Default)]
+    #[derive(Eq, Ord, PartialEq, PartialOrd, Clone, Show, Default)]
     struct Foo { inner: Arc<int> }
 }
index b0fa5434a1474c65f2ebb64be23a4316f337b87f..423c16bfee8e8f376c106e6cbe23acbb80d2227f 100644 (file)
@@ -46,7 +46,7 @@
 // The way arena uses arrays is really deeply awful. The arrays are
 // allocated, and have capacities reserved, but the fill for the array
 // will always stay at 0.
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 struct Chunk {
     data: Rc<RefCell<Vec<u8>>>,
     fill: Cell<uint>,
index b561df56cb8dea93a84058b9c11c825e32fe670d..4a550e5ce277d5eb7b1f8267bb567f9a72b02e6d 100644 (file)
@@ -30,7 +30,7 @@
 //! use std::collections::BinaryHeap;
 //! use std::uint;
 //!
-//! #[deriving(Copy, Eq, PartialEq)]
+//! #[derive(Copy, Eq, PartialEq)]
 //! struct State {
 //!     cost: uint,
 //!     position: uint,
 /// A priority queue implemented with a binary heap.
 ///
 /// This will be a max-heap.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct BinaryHeap<T> {
     data: Vec<T>,
@@ -565,7 +565,7 @@ pub struct Iter <'a, T: 'a> {
     iter: slice::Iter<'a, T>,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, T> Clone for Iter<'a, T> {
     fn clone(&self) -> Iter<'a, T> {
         Iter { iter: self.iter.clone() }
index 922c8bbad190f440fa95ce14534f73c56b0994b4..9f005a327b17cd2c11efad5508ce14cbbb5ff334 100644 (file)
@@ -1040,7 +1040,7 @@ impl cmp::Eq for Bitv {}
 
 /// An iterator for `Bitv`.
 #[stable]
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Iter<'a> {
     bitv: &'a Bitv,
     next_idx: uint,
@@ -1139,7 +1139,7 @@ fn idx(&mut self, index: uint) -> Option<bool> {
 /// let bv: Bitv = s.into_bitv();
 /// assert!(bv[3]);
 /// ```
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct BitvSet {
     bitv: Bitv,
@@ -1784,7 +1784,7 @@ fn hash(&self, state: &mut S) {
 }
 
 /// An iterator for `BitvSet`.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct SetIter<'a> {
     set: &'a BitvSet,
@@ -1792,7 +1792,7 @@ pub struct SetIter<'a> {
 }
 
 /// An iterator combining two `BitvSet` iterators.
-#[deriving(Clone)]
+#[derive(Clone)]
 struct TwoBitPositions<'a> {
     set: &'a BitvSet,
     other: &'a BitvSet,
index 24ba63a500105fa22023850050e42a0ffcd23b0a..159f5723193944eb2dd086e4c312b42c90986860 100644 (file)
@@ -81,7 +81,7 @@
 /// force this degenerate behaviour to occur on every operation. While the total amount of work
 /// done on each operation isn't *catastrophic*, and *is* still bounded by O(B log<sub>B</sub>n),
 /// it is certainly much slower when it does.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct BTreeMap<K, V> {
     root: Node<K, V>,
index f50650c2c8be3ddc7b09517443e87627ad7ae5e5..1f719da590b349b8e772e26d4ef924e9008d0759 100644 (file)
@@ -496,7 +496,7 @@ fn clone(&self) -> Node<K, V> {
 ///     println!("Uninitialized memory: {}", handle.into_kv());
 /// }
 /// ```
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Handle<NodeRef, Type, NodeType> {
     node: NodeRef,
     index: uint
index 623cf080539b5c5a6e70bddacfa09fa260553e64..0406edcdd32e7ac622bbb277544f63120df93e93 100644 (file)
@@ -30,7 +30,7 @@
 ///
 /// See BTreeMap's documentation for a detailed discussion of this collection's performance
 /// benefits and drawbacks.
-#[deriving(Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
+#[derive(Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
 #[stable]
 pub struct BTreeSet<T>{
     map: BTreeMap<T, ()>,
index 9bd9d34a44300fc4a7c0e870378005e228efc34a..6d7e6778ec9894b0d7bfef5034f9dbee54dd01ce 100644 (file)
@@ -84,7 +84,7 @@ pub struct IterMut<'a, T:'a> {
 }
 
 /// An iterator over mutable references to the items of a `DList`.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct IntoIter<T> {
     list: DList<T>
index 81e1541bea0bf70484490fc5e56baa05c812ef4e..324e0cb2b7ba93a226f8e6c607fbe290ca368f3d 100644 (file)
@@ -21,7 +21,7 @@
 
 // FIXME(contentions): implement union family of methods? (general design may be wrong here)
 
-#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 /// A specialized set implementation to use enum types.
 pub struct EnumSet<E> {
     // We must maintain the invariant that no bits are set
@@ -223,7 +223,7 @@ pub struct Iter<E> {
     bits: uint,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<E> Clone for Iter<E> {
     fn clone(&self) -> Iter<E> {
         Iter {
@@ -287,7 +287,7 @@ mod test {
 
     use super::{EnumSet, CLike};
 
-    #[deriving(Copy, PartialEq, Show)]
+    #[derive(Copy, PartialEq, Show)]
     #[repr(uint)]
     enum Foo {
         A, B, C
@@ -491,7 +491,7 @@ fn test_operators() {
     #[should_fail]
     fn test_overflow() {
         #[allow(dead_code)]
-        #[deriving(Copy)]
+        #[derive(Copy)]
         #[repr(uint)]
         enum Bar {
             V00, V01, V02, V03, V04, V05, V06, V07, V08, V09,
index e46297b5e564772400e99d5832ae42a53bdf33a4..77f41a2b0a7e55624f9acd89ed54245c83a9f8b0 100644 (file)
@@ -1139,7 +1139,7 @@ pub struct Iter<'a, T:'a> {
     head: uint
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, T> Clone for Iter<'a, T> {
     fn clone(&self) -> Iter<'a, T> {
         Iter {
@@ -1674,21 +1674,21 @@ fn bench_mut_iter_1000(b: &mut test::Bencher) {
         })
     }
 
-    #[deriving(Clone, PartialEq, Show)]
+    #[derive(Clone, PartialEq, Show)]
     enum Taggy {
         One(int),
         Two(int, int),
         Three(int, int, int),
     }
 
-    #[deriving(Clone, PartialEq, Show)]
+    #[derive(Clone, PartialEq, Show)]
     enum Taggypar<T> {
         Onepar(int),
         Twopar(int, int),
         Threepar(int, int, int),
     }
 
-    #[deriving(Clone, PartialEq, Show)]
+    #[derive(Clone, PartialEq, Show)]
     struct RecCy {
         x: int,
         y: int,
index 12e0feae2d9a1d87aeb06d45ab3d37725a4c7b0b..510be24befd1c5bb0a26c9fc7fd08ad1b896cd50 100644 (file)
@@ -1083,7 +1083,7 @@ fn connect(&self, sep: &T) -> Vec<T> {
 /// The last generated swap is always (0, 1), and it returns the
 /// sequence to its initial order.
 #[experimental]
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct ElementSwaps {
     sdir: Vec<SizeDirection>,
     /// If `true`, emit the last swap that returns the sequence to initial
@@ -1130,11 +1130,11 @@ fn to_owned(&self) -> Vec<T> { self.to_vec() }
 // Iterators
 ////////////////////////////////////////////////////////////////////////////////
 
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
 enum Direction { Pos, Neg }
 
 /// An `Index` and `Direction` together.
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
 struct SizeDirection {
     size: uint,
     dir: Direction,
@@ -2709,7 +2709,7 @@ fn test_mut_split_at() {
         assert!(values == [2, 3, 5, 6, 7]);
     }
 
-    #[deriving(Clone, PartialEq)]
+    #[derive(Clone, PartialEq)]
     struct Foo;
 
     #[test]
index 1c3c14f6d905c0738e2728286f7c018ae961f3d1..fe85d4a5a9307b81440e0ffdeeb086e1dd126438 100644 (file)
@@ -165,7 +165,7 @@ fn canonical_sort(comb: &mut [(char, u8)]) {
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum DecompositionType {
     Canonical,
     Compatible
@@ -173,7 +173,7 @@ enum DecompositionType {
 
 /// External iterator for a string's decomposition's characters.
 /// Use with the `std::iter` module.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Decompositions<'a> {
     kind: DecompositionType,
     iter: Chars<'a>,
@@ -252,7 +252,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum RecompositionState {
     Composing,
     Purging,
@@ -261,7 +261,7 @@ enum RecompositionState {
 
 /// External iterator for a string's recomposition's characters.
 /// Use with the `std::iter` module.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Recompositions<'a> {
     iter: Decompositions<'a>,
     state: RecompositionState,
@@ -356,7 +356,7 @@ fn next(&mut self) -> Option<char> {
 
 /// External iterator for a string's UTF16 codeunits.
 /// Use with the `std::iter` module.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Utf16Units<'a> {
     encoder: Utf16Encoder<Chars<'a>>
 }
index 599f1caa6654c304ea9fa96da58a7271effb098d..0cd3770d39136e721e660d9d7774a467ecd5bc2a 100644 (file)
@@ -33,7 +33,7 @@
 use vec::{DerefVec, Vec, as_vec};
 
 /// A growable string stored as a UTF-8 encoded buffer.
-#[deriving(Clone, PartialOrd, Eq, Ord)]
+#[derive(Clone, PartialOrd, Eq, Ord)]
 #[stable]
 pub struct String {
     vec: Vec<u8>,
index 03870274b71e54567c86f636e3691803e9adce7e..04bdd04bfaacf7d9769e77a48676ec450e3667b2 100644 (file)
@@ -795,7 +795,7 @@ pub fn is_empty(&self) -> bool { self.len() == 0 }
     /// let w = v.map_in_place(|i| i + 3);
     /// assert_eq!(w.as_slice(), [3, 4, 5].as_slice());
     ///
-    /// #[deriving(PartialEq, Show)]
+    /// #[derive(PartialEq, Show)]
     /// struct Newtype(u8);
     /// let bytes = vec![0x11, 0x22];
     /// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
@@ -2276,7 +2276,7 @@ fn test_map_in_place() {
     #[test]
     fn test_map_in_place_zero_sized() {
         let v = vec![(), ()];
-        #[deriving(PartialEq, Show)]
+        #[derive(PartialEq, Show)]
         struct ZeroSized;
         assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]);
     }
@@ -2286,11 +2286,11 @@ fn test_map_in_place_zero_drop_count() {
         use std::sync::atomic;
         use std::sync::atomic::AtomicUint;
 
-        #[deriving(Clone, PartialEq, Show)]
+        #[derive(Clone, PartialEq, Show)]
         struct Nothing;
         impl Drop for Nothing { fn drop(&mut self) { } }
 
-        #[deriving(Clone, PartialEq, Show)]
+        #[derive(Clone, PartialEq, Show)]
         struct ZeroSized;
         impl Drop for ZeroSized {
             fn drop(&mut self) {
index 91edbc7b54e411ae7de9939fc5ac847adcdd0942..b9c1a6a43f972c411e948b86c6498f95bf1b9c6c 100644 (file)
@@ -673,7 +673,7 @@ pub struct Iter<'a, V:'a> {
     iter: slice::Iter<'a, Option<V>>
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, V> Clone for Iter<'a, V> {
     fn clone(&self) -> Iter<'a, V> {
         Iter {
@@ -705,7 +705,7 @@ pub struct Keys<'a, V: 'a> {
     iter: Map<(uint, &'a V), uint, Iter<'a, V>, fn((uint, &'a V)) -> uint>
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, V> Clone for Keys<'a, V> {
     fn clone(&self) -> Keys<'a, V> {
         Keys {
@@ -720,7 +720,7 @@ pub struct Values<'a, V: 'a> {
     iter: Map<(uint, &'a V), &'a V, Iter<'a, V>, fn((uint, &'a V)) -> &'a V>
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, V> Clone for Values<'a, V> {
     fn clone(&self) -> Values<'a, V> {
         Values {
index f653998c9bf5d471db0b65a7856614ee9634da7a..5d3bcb19ae8675fa9e7e9b12e18b91b35e3b44f4 100644 (file)
@@ -62,7 +62,7 @@ unsafe impl<T> Sync for AtomicPtr<T> {}
 /// Rust's memory orderings are [the same as
 /// C++'s](http://gcc.gnu.org/wiki/Atomic/GCCMM/AtomicSync).
 #[stable]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Ordering {
     /// No ordering constraints, only atomic operations.
     #[stable]
index aa6028a19b323fed8da1aae3416200786d9a5397..3bd200d38d715520f530d22904222cbca6700e38 100644 (file)
@@ -430,13 +430,13 @@ fn encode_utf16(&self, dst: &mut [u16]) -> Option<uint> {
 
 /// An iterator over the characters that represent a `char`, as escaped by
 /// Rust's unicode escaping rules.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct EscapeUnicode {
     c: char,
     state: EscapeUnicodeState
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum EscapeUnicodeState {
     Backslash,
     Type,
@@ -490,12 +490,12 @@ fn next(&mut self) -> Option<char> {
 
 /// An iterator over the characters that represent a `char`, escaped
 /// for maximum portability.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct EscapeDefault {
     state: EscapeDefaultState
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum EscapeDefaultState {
     Backslash(char),
     Char(char),
index 203b6fb38b16acff7707bee10df6f21546b31392..6b52d1817e9c4c0c33e7f213bf7f22d87a8c6d15 100644 (file)
@@ -104,7 +104,7 @@ fn assert_receiver_is_total_eq(&self) {}
 }
 
 /// An ordering is, e.g, a result of a comparison between two values.
-#[deriving(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Show)]
 #[stable]
 pub enum Ordering {
     /// An ordering where a compared value is less [than another].
index 0632ffd9c698cc6ca9357dad52231941d5041d25..8d4ecf7224339c64d8e1368389e0e18d61a22c31 100644 (file)
@@ -26,7 +26,7 @@
 //! ```
 //! use std::default::Default;
 //!
-//! #[deriving(Default)]
+//! #[derive(Default)]
 //! struct SomeOptions {
 //!     foo: int,
 //!     bar: f32,
@@ -54,7 +54,7 @@
 //!     fn default() -> Kind { Kind::A }
 //! }
 //!
-//! #[deriving(Default)]
+//! #[derive(Default)]
 //! struct SomeOptions {
 //!     foo: int,
 //!     bar: f32,
@@ -71,7 +71,7 @@
 //!
 //! ```
 //! # use std::default::Default;
-//! # #[deriving(Default)]
+//! # #[derive(Default)]
 //! # struct SomeOptions {
 //! #     foo: int,
 //! #     bar: f32,
 /// A trait that types which have a useful default value should implement.
 ///
 /// A struct can derive default implementations of `Default` for basic types using
-/// `#[deriving(Default)]`.
+/// `#[derive(Default)]`.
 ///
 /// # Examples
 ///
 /// ```
-/// #[deriving(Default)]
+/// #[derive(Default)]
 /// struct SomeOptions {
 ///     foo: int,
 ///     bar: f32,
index 149f61225a51ded2fbbd8662616b38a5a5705e12..f49f87ff329f06ec39730882c8ccba7efe5c8fc1 100644 (file)
@@ -44,7 +44,7 @@
 /// occurred. Any extra information must be arranged to be transmitted through
 /// some other means.
 #[experimental = "core and I/O reconciliation may alter this definition"]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Error;
 
 /// A collection of methods that are required to format a message into a stream.
@@ -122,7 +122,7 @@ enum Void {}
 /// compile time it is ensured that the function and the value have the correct
 /// types, and then this struct is used to canonicalize arguments to one type.
 #[experimental = "implementation detail of the `format_args!` macro"]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Argument<'a> {
     value: &'a Void,
     formatter: fn(&Void, &mut Formatter) -> Result,
@@ -199,7 +199,7 @@ pub fn with_placeholders(pieces: &'a [&'a str],
 /// macro validates the format string at compile-time so usage of the `write`
 /// and `format` functions can be safely performed.
 #[stable]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Arguments<'a> {
     // Format string pieces to print.
     pieces: &'a [&'a str],
index e680230265aa65e99f2ea452e026617501f81b71..e0724fc2da5f5dc4536357efe6587d77397a08e8 100644 (file)
@@ -67,23 +67,23 @@ fn fmt_int<T: Int>(&self, mut x: T, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 /// A binary (base 2) radix
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 struct Binary;
 
 /// An octal (base 8) radix
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 struct Octal;
 
 /// A decimal (base 10) radix
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 struct Decimal;
 
 /// A hexadecimal (base 16) radix, formatted with lower-case characters
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 struct LowerHex;
 
 /// A hexadecimal (base 16) radix, formatted with upper-case characters
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub struct UpperHex;
 
 macro_rules! radix {
@@ -110,7 +110,7 @@ fn digit(&self, x: u8) -> u8 {
                              x @ 10 ... 15 => b'A' + (x - 10) }
 
 /// A radix with in the range of `2..36`.
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 #[unstable = "may be renamed or move to a different module"]
 pub struct Radix {
     base: u8,
@@ -136,7 +136,7 @@ fn digit(&self, x: u8) -> u8 {
 
 /// A helper type for formatting radixes.
 #[unstable = "may be renamed or move to a different module"]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct RadixFmt<T, R>(T, R);
 
 /// Constructs a radix formatter in the range of `2..36`.
index 35dd0390f30872bb64709c3a0ec882e127434e9d..6dbda3d84459ef88aa6461d7e4e611ba8c394144 100644 (file)
 pub use self::Flag::*;
 
 #[doc(hidden)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Argument<'a> {
     pub position: Position,
     pub format: FormatSpec,
 }
 
 #[doc(hidden)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct FormatSpec {
     pub fill: char,
     pub align: Alignment,
@@ -39,7 +39,7 @@ pub struct FormatSpec {
 }
 
 /// Possible alignments that can be requested as part of a formatting directive.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Alignment {
     /// Indication that contents should be left-aligned.
     AlignLeft,
@@ -52,13 +52,13 @@ pub enum Alignment {
 }
 
 #[doc(hidden)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Count {
     CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
 }
 
 #[doc(hidden)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Position {
     ArgumentNext, ArgumentIs(uint)
 }
@@ -68,7 +68,7 @@ pub enum Position {
 /// These flags are discovered through the `flags` field of the `Formatter`
 /// structure. The flag in that structure is a union of these flags into a
 /// `uint` where each flag's discriminant is the corresponding bit.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Flag {
     /// A flag which enables number formatting to always print the sign of a
     /// number.
index d4d241752f20b6fe1edb0e01158c2ffb3f9490d8..b0a5ec9fe12ed5caf7650cf5ac4eb0c1034d90b6 100644 (file)
@@ -11,7 +11,7 @@
 //! Generic hashing support.
 //!
 //! This module provides a generic way to compute the hash of a value. The
-//! simplest way to make a type hashable is to use `#[deriving(Hash)]`:
+//! simplest way to make a type hashable is to use `#[derive(Hash)]`:
 //!
 //! # Examples
 //!
@@ -19,7 +19,7 @@
 //! use std::hash;
 //! use std::hash::Hash;
 //!
-//! #[deriving(Hash)]
+//! #[derive(Hash)]
 //! struct Person {
 //!     id: uint,
 //!     name: String,
index 020f0f6de9bab731809d2bf9c6733a5d04a5251d..f9da0493f3edb0761629e65a3d32169aecae7b44 100644 (file)
@@ -30,7 +30,7 @@
 use super::{Hash, Hasher, Writer};
 
 /// `SipState` computes a SipHash 2-4 hash over a stream of bytes.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct SipState {
     k0: u64,
     k1: u64,
@@ -213,7 +213,7 @@ fn default() -> SipState {
 }
 
 /// `SipHasher` computes the SipHash algorithm from a stream of bytes.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[allow(missing_copy_implementations)]
 pub struct SipHasher {
     k0: u64,
index c5af7e27c6a84460a41a44859d5654fc9c5376b9..7e1359d5c12013cbe2be42332571d970c69034c7 100644 (file)
@@ -45,7 +45,7 @@
 pub type GlueFn = extern "Rust" fn(*const i8);
 
 #[lang="ty_desc"]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct TyDesc {
     // sizeof(T)
     pub size: uint,
@@ -545,7 +545,7 @@ pub fn volatile_copy_nonoverlapping_memory<T>(dst: *mut T, src: *const T,
 /// `TypeId` represents a globally unique identifier for a type
 #[lang="type_id"] // This needs to be kept in lockstep with the code in trans/intrinsic.rs and
                   // middle/lang_items.rs
-#[deriving(Clone, Copy, PartialEq, Eq, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Show)]
 pub struct TypeId {
     t: u64,
 }
index ca3cf7aec2f1b5eb891c67165d5fee49601cb0e5..b409b79cbf5055262638b1a861faa30246932609 100644 (file)
@@ -885,7 +885,7 @@ impl<A, B, I, F> ExactSizeIterator for Map<A, B, I, F> where
 impl<A, B> ExactSizeIterator for Zip<A, B> where A: ExactSizeIterator, B: ExactSizeIterator {}
 
 /// An double-ended iterator with the direction inverted
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Rev<T> {
@@ -1153,7 +1153,7 @@ fn min_max(mut self) -> MinMaxResult<T> {
 }
 
 /// `MinMaxResult` is an enum returned by `min_max`. See `IteratorOrdExt::min_max` for more detail.
-#[deriving(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Show)]
 #[unstable = "waiting on namespaced enum conventions"]
 pub enum MinMaxResult<T> {
     /// Empty iterator
@@ -1280,7 +1280,7 @@ fn cycle(self) -> Cycle<I> {
 }
 
 /// An iterator that repeats endlessly
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Cycle<I> {
@@ -1338,7 +1338,7 @@ fn idx(&mut self, index: uint) -> Option< <I as Iterator>::Item> {
 }
 
 /// An iterator that strings two iterators together
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Chain<A, B> {
@@ -1418,7 +1418,7 @@ fn idx(&mut self, index: uint) -> Option<T> {
 }
 
 /// An iterator that iterates two other iterators simultaneously
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Zip<A, B> {
@@ -1517,7 +1517,7 @@ pub struct Map<A, B, I: Iterator<Item=A>, F: FnMut(A) -> B> {
     f: F,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, B, I, F> Clone for Map<A, B, I, F> where
     I: Clone + Iterator<Item=A>,
@@ -1594,7 +1594,7 @@ pub struct Filter<A, I, P> where I: Iterator<Item=A>, P: FnMut(&A) -> bool {
     predicate: P,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, I, P> Clone for Filter<A, I, P> where
     I: Clone + Iterator<Item=A>,
@@ -1655,7 +1655,7 @@ pub struct FilterMap<A, B, I, F> where I: Iterator<Item=A>, F: FnMut(A) -> Optio
     f: F,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, B, I, F> Clone for FilterMap<A, B, I, F> where
     I: Clone + Iterator<Item=A>,
@@ -1712,7 +1712,7 @@ fn next_back(&mut self) -> Option<B> {
 }
 
 /// An iterator that yields the current count and the element during iteration
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Enumerate<I> {
@@ -1775,7 +1775,7 @@ fn idx(&mut self, index: uint) -> Option<(uint, <I as Iterator>::Item)> {
 /// An iterator with a `peek()` that returns an optional reference to the next element.
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Peekable<T, I> where I: Iterator<Item=T> {
     iter: I,
     peeked: Option<T>,
@@ -1837,7 +1837,7 @@ pub struct SkipWhile<A, I, P> where I: Iterator<Item=A>, P: FnMut(&A) -> bool {
     predicate: P,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, I, P> Clone for SkipWhile<A, I, P> where
     I: Clone + Iterator<Item=A>,
@@ -1883,7 +1883,7 @@ pub struct TakeWhile<A, I, P> where I: Iterator<Item=A>, P: FnMut(&A) -> bool {
     predicate: P,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, I, P> Clone for TakeWhile<A, I, P> where
     I: Clone + Iterator<Item=A>,
@@ -1929,7 +1929,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 /// An iterator that skips over `n` elements of `iter`.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Skip<I> {
@@ -1999,7 +1999,7 @@ fn idx(&mut self, index: uint) -> Option< <I as Iterator>::Item> {
 }
 
 /// An iterator that only iterates over the first `n` iterations of `iter`.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Take<I> {
@@ -2065,7 +2065,7 @@ pub struct Scan<A, B, I, St, F> where I: Iterator, F: FnMut(&mut St, A) -> Optio
     pub state: St,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, B, I, St, F> Clone for Scan<A, B, I, St, F> where
     I: Clone + Iterator<Item=A>,
@@ -2116,7 +2116,7 @@ pub struct FlatMap<A, B, I, U, F> where
     backiter: Option<U>,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, B, I, U, F> Clone for FlatMap<A, B, I, U, F> where
     I: Clone + Iterator<Item=A>,
@@ -2193,7 +2193,7 @@ fn next_back(&mut self) -> Option<B> {
 
 /// An iterator that yields `None` forever after the underlying iterator
 /// yields `None` once.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
 pub struct Fuse<I> {
@@ -2281,7 +2281,7 @@ pub struct Inspect<A, I, F> where I: Iterator<Item=A>, F: FnMut(&A) {
     f: F,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, I, F> Clone for Inspect<A, I, F> where
     I: Clone + Iterator<Item=A>,
@@ -2391,7 +2391,7 @@ pub struct Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> {
     pub state: St,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<A, St, F> Clone for Unfold<A, St, F> where
     F: Clone + FnMut(&mut St) -> Option<A>,
@@ -2436,7 +2436,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 
 /// An infinite iterator starting at `start` and advancing by `step` with each
 /// iteration
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 #[unstable = "may be renamed"]
 pub struct Counter<A> {
     /// The current state the counter is at (next value to be yielded)
@@ -2470,7 +2470,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 /// An iterator over the range [start, stop)
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 #[unstable = "may be refactored due to numerics reform or ops reform"]
 pub struct Range<A> {
     state: A,
@@ -2565,7 +2565,7 @@ fn next_back(&mut self) -> Option<A> {
 }
 
 /// An iterator over the range [start, stop]
-#[deriving(Clone)]
+#[derive(Clone)]
 #[unstable = "may be refactored due to numerics reform or ops reform"]
 pub struct RangeInclusive<A> {
     range: Range<A>,
@@ -2635,7 +2635,7 @@ fn next_back(&mut self) -> Option<A> {
 }
 
 /// An iterator over the range [start, stop) by `step`. It handles overflow by stopping.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[unstable = "may be refactored due to numerics reform or ops reform"]
 pub struct RangeStep<A> {
     state: A,
@@ -2672,7 +2672,7 @@ fn next(&mut self) -> Option<A> {
 }
 
 /// An iterator over the range [start, stop] by `step`. It handles overflow by stopping.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[unstable = "may be refactored due to numerics reform or ops reform"]
 pub struct RangeStepInclusive<A> {
     state: A,
@@ -2775,7 +2775,7 @@ fn steps_between(_a: &$t, _b: &$t) -> Option<uint> {
 
 
 /// An iterator that repeats an element endlessly
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct Repeat<A> {
     element: A
index fb030ea45f3998180bb64a72d73838b55a8f8ac2..e50aaef5f09f3de77ebfb3d0a10a39a84fecddfc 100644 (file)
@@ -132,7 +132,7 @@ pub mod marker {
     /// (for example, `S<&'static int>` is a subtype of `S<&'a int>`
     /// for some lifetime `'a`, but not the other way around).
     #[lang="covariant_type"]
-    #[deriving(PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(PartialEq, Eq, PartialOrd, Ord)]
     pub struct CovariantType<Sized? T>;
 
     impl<Sized? T> Copy for CovariantType<T> {}
@@ -180,7 +180,7 @@ fn clone(&self) -> CovariantType<T> { *self }
     /// function requires arguments of type `T`, it must also accept
     /// arguments of type `U`, hence such a conversion is safe.
     #[lang="contravariant_type"]
-    #[deriving(PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(PartialEq, Eq, PartialOrd, Ord)]
     pub struct ContravariantType<Sized? T>;
 
     impl<Sized? T> Copy for ContravariantType<T> {}
@@ -210,7 +210,7 @@ fn clone(&self) -> ContravariantType<T> { *self }
     /// never written, but in fact `Cell` uses unsafe code to achieve
     /// interior mutability.
     #[lang="invariant_type"]
-    #[deriving(PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(PartialEq, Eq, PartialOrd, Ord)]
     pub struct InvariantType<Sized? T>;
 
     impl<Sized? T> Copy for InvariantType<T> {}
@@ -235,7 +235,7 @@ fn clone(&self) -> InvariantType<T> { *self }
     /// For more information about variance, refer to this Wikipedia
     /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
     #[lang="covariant_lifetime"]
-    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct CovariantLifetime<'a>;
 
     /// As `ContravariantType`, but for lifetime parameters. Using
@@ -251,7 +251,7 @@ fn clone(&self) -> InvariantType<T> { *self }
     /// For more information about variance, refer to this Wikipedia
     /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
     #[lang="contravariant_lifetime"]
-    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct ContravariantLifetime<'a>;
 
     /// As `InvariantType`, but for lifetime parameters. Using
@@ -262,7 +262,7 @@ fn clone(&self) -> InvariantType<T> { *self }
     /// and this pointer is itself stored in an inherently mutable
     /// location (such as a `Cell`).
     #[lang="invariant_lifetime"]
-    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct InvariantLifetime<'a>;
 
     /// A type which is considered "not sendable", meaning that it cannot
@@ -270,14 +270,14 @@ fn clone(&self) -> InvariantType<T> { *self }
     /// typically embedded in other types, such as `Gc`, to ensure that
     /// their instances remain thread-local.
     #[lang="no_send_bound"]
-    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct NoSend;
 
     /// A type which is considered "not POD", meaning that it is not
     /// implicitly copyable. This is typically embedded in other types to
     /// ensure that they are never copied, even if they lack a destructor.
     #[lang="no_copy_bound"]
-    #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
     #[allow(missing_copy_implementations)]
     pub struct NoCopy;
 
@@ -285,13 +285,13 @@ fn clone(&self) -> InvariantType<T> { *self }
     /// its contents are not threadsafe, hence they cannot be
     /// shared between tasks.
     #[lang="no_sync_bound"]
-    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct NoSync;
 
     /// A type which is considered managed by the GC. This is typically
     /// embedded in other types.
     #[lang="managed_bound"]
-    #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
+    #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
     #[allow(missing_copy_implementations)]
     pub struct Managed;
 }
index ba9103520d8751f5e3e1751f0ce6cdfeec42f553..087404da624348ce48d40c3fff7fdb7bf42f51b3 100644 (file)
@@ -31,7 +31,7 @@ unsafe impl Zeroable for u64 {}
 /// A wrapper type for raw pointers and integers that will never be
 /// NULL or 0 that might allow certain optimizations.
 #[lang="non_zero"]
-#[deriving(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show)]
+#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show)]
 #[experimental]
 pub struct NonZero<T: Zeroable>(T);
 
index 254788f9a75f193b83ba19d964a721eef28f4126..4793efbe02ac3ce50edd3d0d311b95bbb4a21df8 100644 (file)
@@ -1218,7 +1218,7 @@ fn from<N: ToPrimitive>(n: N) -> Option<$T> {
 impl_num_cast! { f64,   to_f64 }
 
 /// Used for representing the classification of floating point numbers
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 #[unstable = "may be renamed"]
 pub enum FpCategory {
     /// "Not a Number", often obtained by dividing by zero
index 7a689bec6cfa412c2e60f17b005bf9344d1ce22b..2a7df5db5c900a13c3a94805f20e890114d3d785 100644 (file)
@@ -29,7 +29,7 @@
 //!
 //! use std::ops::{Add, Sub};
 //!
-//! #[deriving(Show)]
+//! #[derive(Show)]
 //! struct Point {
 //!     x: int,
 //!     y: int
@@ -103,7 +103,7 @@ pub trait Drop {
 ///
 /// use std::ops::Add;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Add for Foo {
@@ -152,7 +152,7 @@ fn add(self, other: $t) -> $t { self + other }
 ///
 /// use std::ops::Sub;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Sub for Foo {
@@ -201,7 +201,7 @@ fn sub(self, other: $t) -> $t { self - other }
 ///
 /// use std::ops::Mul;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Mul for Foo {
@@ -250,7 +250,7 @@ fn mul(self, other: $t) -> $t { self * other }
 ///
 /// use std::ops::Div;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Div for Foo {
@@ -299,7 +299,7 @@ fn div(self, other: $t) -> $t { self / other }
 ///
 /// use std::ops::Rem;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Rem for Foo {
@@ -482,7 +482,7 @@ fn not(self) -> $t { !self }
 ///
 /// use std::ops::BitAnd;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl BitAnd for Foo {
@@ -531,7 +531,7 @@ fn bitand(self, rhs: $t) -> $t { self & rhs }
 ///
 /// use std::ops::BitOr;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl BitOr for Foo {
@@ -580,7 +580,7 @@ fn bitor(self, rhs: $t) -> $t { self | rhs }
 ///
 /// use std::ops::BitXor;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl BitXor for Foo {
@@ -629,7 +629,7 @@ fn bitxor(self, other: $t) -> $t { self ^ other }
 ///
 /// use std::ops::Shl;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Shl<Foo> for Foo {
@@ -680,7 +680,7 @@ fn shl(self, other: uint) -> $t {
 ///
 /// use std::ops::Shr;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Shr<Foo> for Foo {
@@ -739,7 +739,7 @@ pub trait Index<Sized? Index, Sized? Result> for Sized? {
 ///
 /// use std::ops::Index;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Index<Foo> for Foo {
@@ -786,7 +786,7 @@ pub trait IndexMut<Sized? Index, Sized? Result> for Sized? {
 ///
 /// use std::ops::IndexMut;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl IndexMut<Foo> for Foo {
@@ -822,7 +822,7 @@ pub trait IndexMut<Sized? Index> for Sized? {
 /// ```ignore
 /// use std::ops::Slice;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Slice<Foo, Foo> for Foo {
@@ -871,7 +871,7 @@ pub trait Slice<Sized? Idx, Sized? Result> for Sized? {
 /// ```ignore
 /// use std::ops::SliceMut;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl SliceMut<Foo, Foo> for Foo {
@@ -911,12 +911,12 @@ pub trait SliceMut<Sized? Idx, Sized? Result> for Sized? {
 
 
 /// An unbounded range.
-#[deriving(Copy)]
+#[derive(Copy)]
 #[lang="full_range"]
 pub struct FullRange;
 
 /// A (half-open) range which is bounded at both ends.
-#[deriving(Copy)]
+#[derive(Copy)]
 #[lang="range"]
 pub struct Range<Idx> {
     /// The lower bound of the range (inclusive).
@@ -966,7 +966,7 @@ fn next_back(&mut self) -> Option<Idx> {
 impl<Idx: Clone + Step> ExactSizeIterator for Range<Idx> {}
 
 /// A range which is only bounded below.
-#[deriving(Copy)]
+#[derive(Copy)]
 #[lang="range_from"]
 pub struct RangeFrom<Idx> {
     /// The lower bound of the range (inclusive).
@@ -986,7 +986,7 @@ fn next(&mut self) -> Option<Idx> {
 }
 
 /// A range which is only bounded above.
-#[deriving(Copy)]
+#[derive(Copy)]
 #[lang="range_to"]
 pub struct RangeTo<Idx> {
     /// The upper bound of the range (exclusive).
index 92209b937d9271da06ba923ee835571c81d478c1..a9a1857ec97bf3764f91da9751ce60675447600d 100644 (file)
 // which basically means it must be `Option`.
 
 /// The `Option` type.
-#[deriving(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)]
 #[stable]
 pub enum Option<T> {
     /// No value
@@ -772,7 +772,7 @@ fn default() -> Option<T> { None }
 // The Option Iterators
 /////////////////////////////////////////////////////////////////////////////
 
-#[deriving(Clone)]
+#[derive(Clone)]
 struct Item<A> {
     opt: Option<A>
 }
index d70c96d8c16623cee38642b472bc447ae3a2aa1a..3bef1d153637796e710920c34e84083eac39c9e6 100644 (file)
@@ -33,7 +33,7 @@ impl<T> Copy for Slice<T> {}
 
 /// The representation of a Rust closure
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Closure {
     pub code: *mut (),
     pub env: *mut (),
@@ -44,7 +44,7 @@ pub struct Closure {
 /// This struct does not have a `Repr` implementation
 /// because there is no way to refer to all trait objects generically.
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct TraitObject {
     pub data: *mut (),
     pub vtable: *mut (),
index 71d62f021a976cb55a412125523188548964b65c..7135faaa76516aa257ab14ea37f4cf44eeb179a9 100644 (file)
@@ -30,7 +30,7 @@
 //! defined and used like so:
 //!
 //! ```
-//! #[deriving(Show)]
+//! #[derive(Show)]
 //! enum Version { Version1, Version2 }
 //!
 //! fn parse_version(header: &[u8]) -> Result<Version, &'static str> {
 /// `Result` is a type that represents either success (`Ok`) or failure (`Err`).
 ///
 /// See the [`std::result`](index.html) module documentation for details.
-#[deriving(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show, Hash)]
 #[must_use]
 #[stable]
 pub enum Result<T, E> {
index 0b0e6ff95c6599925c4823328d05913039d9d52b..66b29bab98c24326c96967b6b5c1c5cf448e3d4c 100644 (file)
@@ -39,7 +39,7 @@
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
                  pub i8, pub i8, pub i8, pub i8,
@@ -48,26 +48,26 @@ pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
                  pub i16, pub i16, pub i16, pub i16);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct i64x2(pub i64, pub i64);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
                  pub u8, pub u8, pub u8, pub u8,
@@ -76,31 +76,31 @@ pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
                  pub u16, pub u16, pub u16, pub u16);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct u64x2(pub u64, pub u64);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
 
 #[experimental]
 #[simd]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 #[repr(C)]
 pub struct f64x2(pub f64, pub f64);
index 95b528b5773b62dbc127fc8f041115663eed102b..fd4bc4a141357d477e0389787be8ec8b6af30d24 100644 (file)
@@ -907,7 +907,7 @@ pub struct Split<'a, T:'a, P> where P: FnMut(&T) -> bool {
     finished: bool
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 #[stable]
 impl<'a, T, P> Clone for Split<'a, T, P> where P: Clone + FnMut(&T) -> bool {
     fn clone(&self) -> Split<'a, T, P> {
@@ -1133,7 +1133,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 forward_iterator! { RSplitNMut: T, &'a mut [T] }
 
 /// An iterator over overlapping subslices of length `size`.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[experimental = "needs review"]
 pub struct Windows<'a, T:'a> {
     v: &'a [T],
@@ -1170,7 +1170,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 ///
 /// When the slice len is not evenly divided by the chunk size, the last slice
 /// of the iteration will be the remainder.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[experimental = "needs review"]
 pub struct Chunks<'a, T:'a> {
     v: &'a [T],
index 6744e2d851f57f23c0363b3314abcef0e35bf1c0..07662c567e389443f49a864504e0edea35fcffe4 100644 (file)
@@ -147,7 +147,7 @@ fn from_str(s: &str) -> Option<bool> {
 */
 
 /// Errors which can occur when attempting to interpret a byte slice as a `str`.
-#[deriving(Copy, Eq, PartialEq, Clone)]
+#[derive(Copy, Eq, PartialEq, Clone)]
 pub enum Utf8Error {
     /// An invalid byte was detected at the byte offset given.
     ///
@@ -252,7 +252,7 @@ fn only_ascii(&self) -> bool {
 /// Iterator for the char (representing *Unicode Scalar Values*) of a string
 ///
 /// Created with the method `.chars()`.
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct Chars<'a> {
     iter: slice::Iter<'a, u8>
 }
@@ -361,7 +361,7 @@ fn next_back(&mut self) -> Option<char> {
 
 /// External iterator for a string's characters and their byte offsets.
 /// Use with the `std::iter` module.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct CharIndices<'a> {
     front_offset: uint,
     iter: Chars<'a>,
@@ -409,13 +409,13 @@ fn next_back(&mut self) -> Option<(uint, char)> {
 ///
 /// Created with `StrExt::bytes`
 #[stable]
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Bytes<'a>(Map<&'a u8, u8, slice::Iter<'a, u8>, BytesDeref>);
 delegate_iter!{exact u8 in Bytes<'a>}
 
 /// A temporary fn new type that ensures that the `Bytes` iterator
 /// is cloneable.
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
 struct BytesDeref;
 
 impl<'a> Fn(&'a u8) -> u8 for BytesDeref {
@@ -426,7 +426,7 @@ extern "rust-call" fn call(&self, (ptr,): (&'a u8,)) -> u8 {
 }
 
 /// An iterator over the substrings of a string, separated by `sep`.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[deprecated = "Type is now named `Split` or `SplitTerminator`"]
 pub struct CharSplits<'a, Sep> {
     /// The slice remaining to be iterated
@@ -440,7 +440,7 @@ pub struct CharSplits<'a, Sep> {
 
 /// An iterator over the substrings of a string, separated by `sep`,
 /// splitting at most `count` times.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[deprecated = "Type is now named `SplitN` or `RSplitN`"]
 pub struct CharSplitsN<'a, Sep> {
     iter: CharSplits<'a, Sep>,
@@ -564,7 +564,7 @@ fn next(&mut self) -> Option<&'a str> {
 
 /// The internal state of an iterator that searches for matches of a substring
 /// within a larger string using naive search
-#[deriving(Clone)]
+#[derive(Clone)]
 struct NaiveSearcher {
     position: uint
 }
@@ -590,7 +590,7 @@ fn next(&mut self, haystack: &[u8], needle: &[u8]) -> Option<(uint, uint)> {
 
 /// The internal state of an iterator that searches for matches of a substring
 /// within a larger string using two-way search
-#[deriving(Clone)]
+#[derive(Clone)]
 struct TwoWaySearcher {
     // constants
     crit_pos: uint,
@@ -827,7 +827,7 @@ fn maximal_suffix(arr: &[u8], reversed: bool) -> (uint, uint) {
 
 /// The internal state of an iterator that searches for matches of a substring
 /// within a larger string using a dynamically chosen search algorithm
-#[deriving(Clone)]
+#[derive(Clone)]
 enum Searcher {
     Naive(NaiveSearcher),
     TwoWay(TwoWaySearcher),
@@ -855,7 +855,7 @@ fn new(haystack: &[u8], needle: &[u8]) -> Searcher {
 
 /// An iterator over the start and end indices of the matches of a
 /// substring within a larger string
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct MatchIndices<'a> {
     // constants
     haystack: &'a str,
@@ -865,7 +865,7 @@ pub struct MatchIndices<'a> {
 
 /// An iterator over the substrings of a string separated by a given
 /// search string
-#[deriving(Clone)]
+#[derive(Clone)]
 #[unstable = "Type might get removed"]
 pub struct SplitStr<'a> {
     it: MatchIndices<'a>,
@@ -1073,7 +1073,7 @@ pub fn utf8_char_width(b: u8) -> uint {
 /// Struct that contains a `char` and the index of the first byte of
 /// the next `char` in a string.  This can be used as a data structure
 /// for iterating over the UTF-8 bytes of a string.
-#[deriving(Copy)]
+#[derive(Copy)]
 #[unstable = "naming is uncertain with container conventions"]
 pub struct CharRange {
     /// Current `char`
@@ -1249,25 +1249,25 @@ fn as_slice(&self) -> &str { Str::as_slice(*self) }
 }
 
 /// Return type of `StrExt::split`
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct Split<'a, P>(CharSplits<'a, P>);
 delegate_iter!{pattern &'a str in Split<'a, P>}
 
 /// Return type of `StrExt::split_terminator`
-#[deriving(Clone)]
+#[derive(Clone)]
 #[unstable = "might get removed in favour of a constructor method on Split"]
 pub struct SplitTerminator<'a, P>(CharSplits<'a, P>);
 delegate_iter!{pattern &'a str in SplitTerminator<'a, P>}
 
 /// Return type of `StrExt::splitn`
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct SplitN<'a, P>(CharSplitsN<'a, P>);
 delegate_iter!{pattern forward &'a str in SplitN<'a, P>}
 
 /// Return type of `StrExt::rsplitn`
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct RSplitN<'a, P>(CharSplitsN<'a, P>);
 delegate_iter!{pattern forward &'a str in RSplitN<'a, P>}
index e9e2028dc614775acd99f1ffbba443493546da04..9b0471bfad9365b4d506e7d916679f72329df2a6 100644 (file)
@@ -11,7 +11,7 @@
 use test::Bencher;
 use test;
 
-#[deriving(PartialEq, Show)]
+#[derive(PartialEq, Show)]
 struct Test;
 
 static TEST: &'static str = "Test";
index ecb657b5a2ba5853e784d1bf0523cf508d52544d..a4d89bf301ec61127e531e7d362cd07163d76a8f 100644 (file)
@@ -37,7 +37,7 @@
 
 /// A piece is a portion of the format string which represents the next part
 /// to emit. These are emitted as a stream by the `Parser` class.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Piece<'a> {
     /// A literal string which should directly be emitted
     String(&'a str),
@@ -47,7 +47,7 @@ pub enum Piece<'a> {
 }
 
 /// Representation of an argument specification.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub struct Argument<'a> {
     /// Where to find this argument
     pub position: Position<'a>,
@@ -56,7 +56,7 @@ pub struct Argument<'a> {
 }
 
 /// Specification for the formatting of an argument in the format string.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub struct FormatSpec<'a> {
     /// Optionally specified character to fill alignment with
     pub fill: Option<char>,
@@ -75,7 +75,7 @@ pub struct FormatSpec<'a> {
 }
 
 /// Enum describing where an argument for a format can be located.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Position<'a> {
     /// The argument will be in the next position. This is the default.
     ArgumentNext,
@@ -86,7 +86,7 @@ pub enum Position<'a> {
 }
 
 /// Enum of alignments which are supported.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Alignment {
     /// The value will be aligned to the left.
     AlignLeft,
@@ -100,7 +100,7 @@ pub enum Alignment {
 
 /// Various flags which can be applied to format strings. The meaning of these
 /// flags is defined by the formatters themselves.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Flag {
     /// A `+` will be used to denote positive numbers.
     FlagSignPlus,
@@ -116,7 +116,7 @@ pub enum Flag {
 
 /// A count is used for the precision and width parameters of an integer, and
 /// can reference either an argument or a literal integer.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Count<'a> {
     /// The count is specified explicitly.
     CountIs(uint),
index 0db0bd413ac949b5aa800db49f09b19265a31cba..2063654077f15c0998e106a6b49fee30899408ed 100644 (file)
 use std::result;
 
 /// Name of an option. Either a string or a single char.
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 pub enum Name {
     /// A string representing the long name of an option.
     /// For example: "help"
@@ -116,7 +116,7 @@ pub enum Name {
 }
 
 /// Describes whether an option has an argument.
-#[deriving(Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy, PartialEq, Eq)]
 pub enum HasArg {
     /// The option requires an argument.
     Yes,
@@ -127,7 +127,7 @@ pub enum HasArg {
 }
 
 /// Describes how often an option may occur.
-#[deriving(Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy, PartialEq, Eq)]
 pub enum Occur {
     /// The option occurs once.
     Req,
@@ -138,7 +138,7 @@ pub enum Occur {
 }
 
 /// A description of a possible option.
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 pub struct Opt {
     /// Name of the option
     pub name: Name,
@@ -152,7 +152,7 @@ pub struct Opt {
 
 /// One group of options, e.g., both `-h` and `--help`, along with
 /// their shared description and properties.
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 pub struct OptGroup {
     /// Short name of the option, e.g. `h` for a `-h` option
     pub short_name: String,
@@ -169,7 +169,7 @@ pub struct OptGroup {
 }
 
 /// Describes whether an option is given at all or has a value.
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 enum Optval {
     Val(String),
     Given,
@@ -177,7 +177,7 @@ enum Optval {
 
 /// The result of checking command line arguments. Contains a vector
 /// of matches and a vector of free strings.
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 pub struct Matches {
     /// Options that matched
     opts: Vec<Opt>,
@@ -190,7 +190,7 @@ pub struct Matches {
 /// The type returned when the command line does not conform to the
 /// expected format. Use the `Show` implementation to output detailed
 /// information.
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 pub enum Fail {
     /// The option requires an argument but none was passed.
     ArgumentMissing(String),
@@ -205,7 +205,7 @@ pub enum Fail {
 }
 
 /// The type of failure that occurred.
-#[deriving(Copy, PartialEq, Eq)]
+#[derive(Copy, PartialEq, Eq)]
 #[allow(missing_docs)]
 pub enum FailType {
     ArgumentMissing_,
@@ -827,18 +827,18 @@ pub fn short_usage(program_name: &str, opts: &[OptGroup]) -> String {
     line
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum SplitWithinState {
     A,  // leading whitespace, initial state
     B,  // words
     C,  // internal and trailing whitespace
 }
-#[deriving(Copy)]
+#[derive(Copy)]
 enum Whitespace {
     Ws, // current char is whitespace
     Cr  // current char is not whitespace
 }
-#[deriving(Copy)]
+#[derive(Copy)]
 enum LengthLimit {
     UnderLim, // current char makes current substring still fit in limit
     OverLim   // current char makes current substring no longer fit in limit
index 01e55fb2edd9a9e58ab807e543d55fbf39378f25..e5a8db54eab05c3f699cab4fd51ef0c7053ba597 100644 (file)
@@ -517,7 +517,7 @@ pub trait GraphWalk<'a, N, E> {
     fn target(&'a self, edge: &E) -> N;
 }
 
-#[deriving(Copy, PartialEq, Eq, Show)]
+#[derive(Copy, PartialEq, Eq, Show)]
 pub enum RenderOption {
     NoEdgeLabels,
     NoNodeLabels,
index ac0bab67b406f63af3007d7d4f76b285ee2ca853..e3f02146a75f437bbd8ef411106ca509c52f07be 100644 (file)
@@ -386,7 +386,7 @@ pub mod posix01 {
                 pub type pthread_t = c_ulong;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct glob_t {
+                #[derive(Copy)] pub struct glob_t {
                     pub gl_pathc: size_t,
                     pub gl_pathv: *mut *mut c_char,
                     pub gl_offs:  size_t,
@@ -399,18 +399,18 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timeval {
+                #[derive(Copy)] pub struct timeval {
                     pub tv_sec: time_t,
                     pub tv_usec: suseconds_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timespec {
+                #[derive(Copy)] pub struct timespec {
                     pub tv_sec: time_t,
                     pub tv_nsec: c_long,
                 }
 
-                #[deriving(Copy)] pub enum timezone {}
+                #[derive(Copy)] pub enum timezone {}
 
                 pub type sighandler_t = size_t;
             }
@@ -423,29 +423,29 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr {
+                #[derive(Copy)] pub struct sockaddr {
                     pub sa_family: sa_family_t,
                     pub sa_data: [u8; 14],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_storage {
+                #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_family: sa_family_t,
                     pub __ss_align: i64,
                     pub __ss_pad2: [u8; 112],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in {
+                #[derive(Copy)] pub struct sockaddr_in {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
                     pub sin_zero: [u8; 8],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in_addr {
+                #[derive(Copy)] pub struct in_addr {
                     pub s_addr: in_addr_t,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in6 {
+                #[derive(Copy)] pub struct sockaddr_in6 {
                     pub sin6_family: sa_family_t,
                     pub sin6_port: in_port_t,
                     pub sin6_flowinfo: u32,
@@ -453,21 +453,21 @@ pub mod bsd44 {
                     pub sin6_scope_id: u32,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in6_addr {
+                #[derive(Copy)] pub struct in6_addr {
                     pub s6_addr: [u16; 8]
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip_mreq {
+                #[derive(Copy)] pub struct ip_mreq {
                     pub imr_multiaddr: in_addr,
                     pub imr_interface: in_addr,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip6_mreq {
+                #[derive(Copy)] pub struct ip6_mreq {
                     pub ipv6mr_multiaddr: in6_addr,
                     pub ipv6mr_interface: c_uint,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct addrinfo {
+                #[derive(Copy)] pub struct addrinfo {
                     pub ai_flags: c_int,
                     pub ai_family: c_int,
                     pub ai_socktype: c_int,
@@ -489,13 +489,13 @@ pub mod bsd44 {
                     pub ai_next: *mut addrinfo,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_un {
+                #[derive(Copy)] pub struct sockaddr_un {
                     pub sun_family: sa_family_t,
                     pub sun_path: [c_char; 108]
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ifaddrs {
+                #[derive(Copy)] pub struct ifaddrs {
                     pub ifa_next: *mut ifaddrs,
                     pub ifa_name: *mut c_char,
                     pub ifa_flags: c_uint,
@@ -578,7 +578,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub __pad1: c_short,
                     pub st_ino: ino_t,
@@ -602,13 +602,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __size: [u32; 9]
                 }
             }
@@ -623,7 +623,7 @@ pub mod posix01 {
                 pub type blkcnt_t = u32;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: c_ulonglong,
                     pub __pad0: [c_uchar; 4],
                     pub __st_ino: ino_t,
@@ -646,13 +646,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __size: [u32; 9]
                 }
             }
@@ -668,7 +668,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: c_ulong,
                     pub st_pad1: [c_long; 3],
                     pub st_ino: ino_t,
@@ -692,13 +692,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __size: [u32; 9]
                 }
             }
@@ -707,7 +707,7 @@ pub mod bsd44 {}
             pub mod extra {
                 use types::os::arch::c95::{c_ushort, c_int, c_uchar};
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_ll {
+                #[derive(Copy)] pub struct sockaddr_ll {
                     pub sll_family: c_ushort,
                     pub sll_protocol: c_ushort,
                     pub sll_ifindex: c_int,
@@ -779,7 +779,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i64;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub st_ino: ino_t,
                     pub st_nlink: nlink_t,
@@ -801,13 +801,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __size: [u64; 7]
                 }
             }
@@ -823,7 +823,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i64;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub st_ino: ino_t,
                     pub st_mode: mode_t,
@@ -846,13 +846,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __size: [u64; 8]
                 }
             }
@@ -862,7 +862,7 @@ pub mod bsd44 {
             }
             pub mod extra {
                 use types::os::arch::c95::{c_ushort, c_int, c_uchar};
-                #[deriving(Copy)] pub struct sockaddr_ll {
+                #[derive(Copy)] pub struct sockaddr_ll {
                     pub sll_family: c_ushort,
                     pub sll_protocol: c_ushort,
                     pub sll_ifindex: c_int,
@@ -888,7 +888,7 @@ pub mod posix01 {
                 pub type pthread_t = uintptr_t;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct glob_t {
+                #[derive(Copy)] pub struct glob_t {
                     pub gl_pathc:  size_t,
                     pub __unused1: size_t,
                     pub gl_offs:   size_t,
@@ -905,18 +905,18 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timeval {
+                #[derive(Copy)] pub struct timeval {
                     pub tv_sec: time_t,
                     pub tv_usec: suseconds_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timespec {
+                #[derive(Copy)] pub struct timespec {
                     pub tv_sec: time_t,
                     pub tv_nsec: c_long,
                 }
 
-                #[deriving(Copy)] pub enum timezone {}
+                #[derive(Copy)] pub enum timezone {}
 
                 pub type sighandler_t = size_t;
             }
@@ -929,13 +929,13 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr {
+                #[derive(Copy)] pub struct sockaddr {
                     pub sa_len: u8,
                     pub sa_family: sa_family_t,
                     pub sa_data: [u8; 14],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_storage {
+                #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_len: u8,
                     pub ss_family: sa_family_t,
                     pub __ss_pad1: [u8; 6],
@@ -943,7 +943,7 @@ pub mod bsd44 {
                     pub __ss_pad2: [u8; 112],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in {
+                #[derive(Copy)] pub struct sockaddr_in {
                     pub sin_len: u8,
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
@@ -951,11 +951,11 @@ pub mod bsd44 {
                     pub sin_zero: [u8; 8],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in_addr {
+                #[derive(Copy)] pub struct in_addr {
                     pub s_addr: in_addr_t,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in6 {
+                #[derive(Copy)] pub struct sockaddr_in6 {
                     pub sin6_len: u8,
                     pub sin6_family: sa_family_t,
                     pub sin6_port: in_port_t,
@@ -964,21 +964,21 @@ pub mod bsd44 {
                     pub sin6_scope_id: u32,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in6_addr {
+                #[derive(Copy)] pub struct in6_addr {
                     pub s6_addr: [u16; 8]
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip_mreq {
+                #[derive(Copy)] pub struct ip_mreq {
                     pub imr_multiaddr: in_addr,
                     pub imr_interface: in_addr,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip6_mreq {
+                #[derive(Copy)] pub struct ip6_mreq {
                     pub ipv6mr_multiaddr: in6_addr,
                     pub ipv6mr_interface: c_uint,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct addrinfo {
+                #[derive(Copy)] pub struct addrinfo {
                     pub ai_flags: c_int,
                     pub ai_family: c_int,
                     pub ai_socktype: c_int,
@@ -989,13 +989,13 @@ pub mod bsd44 {
                     pub ai_next: *mut addrinfo,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_un {
+                #[derive(Copy)] pub struct sockaddr_un {
                     pub sun_len: u8,
                     pub sun_family: sa_family_t,
                     pub sun_path: [c_char; 104]
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ifaddrs {
+                #[derive(Copy)] pub struct ifaddrs {
                     pub ifa_next: *mut ifaddrs,
                     pub ifa_name: *mut c_char,
                     pub ifa_flags: c_uint,
@@ -1062,7 +1062,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i64;
                 pub type fflags_t = u32;
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub st_ino: ino_t,
                     pub st_mode: mode_t,
@@ -1088,7 +1088,7 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
@@ -1116,7 +1116,7 @@ pub mod posix01 {
                 pub type pthread_t = uintptr_t;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct glob_t {
+                #[derive(Copy)] pub struct glob_t {
                     pub gl_pathc:  size_t,
                     pub __unused1: size_t,
                     pub gl_offs:   size_t,
@@ -1133,18 +1133,18 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timeval {
+                #[derive(Copy)] pub struct timeval {
                     pub tv_sec: time_t,
                     pub tv_usec: suseconds_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timespec {
+                #[derive(Copy)] pub struct timespec {
                     pub tv_sec: time_t,
                     pub tv_nsec: c_long,
                 }
 
-                #[deriving(Copy)] pub enum timezone {}
+                #[derive(Copy)] pub enum timezone {}
 
                 pub type sighandler_t = size_t;
             }
@@ -1157,13 +1157,13 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr {
+                #[derive(Copy)] pub struct sockaddr {
                     pub sa_len: u8,
                     pub sa_family: sa_family_t,
                     pub sa_data: [u8; 14],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_storage {
+                #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_len: u8,
                     pub ss_family: sa_family_t,
                     pub __ss_pad1: [u8; 6],
@@ -1171,7 +1171,7 @@ pub mod bsd44 {
                     pub __ss_pad2: [u8; 112],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in {
+                #[derive(Copy)] pub struct sockaddr_in {
                     pub sin_len: u8,
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
@@ -1179,11 +1179,11 @@ pub mod bsd44 {
                     pub sin_zero: [u8; 8],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in_addr {
+                #[derive(Copy)] pub struct in_addr {
                     pub s_addr: in_addr_t,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in6 {
+                #[derive(Copy)] pub struct sockaddr_in6 {
                     pub sin6_len: u8,
                     pub sin6_family: sa_family_t,
                     pub sin6_port: in_port_t,
@@ -1192,21 +1192,21 @@ pub mod bsd44 {
                     pub sin6_scope_id: u32,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in6_addr {
+                #[derive(Copy)] pub struct in6_addr {
                     pub s6_addr: [u16; 8]
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip_mreq {
+                #[derive(Copy)] pub struct ip_mreq {
                     pub imr_multiaddr: in_addr,
                     pub imr_interface: in_addr,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip6_mreq {
+                #[derive(Copy)] pub struct ip6_mreq {
                     pub ipv6mr_multiaddr: in6_addr,
                     pub ipv6mr_interface: c_uint,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct addrinfo {
+                #[derive(Copy)] pub struct addrinfo {
                     pub ai_flags: c_int,
                     pub ai_family: c_int,
                     pub ai_socktype: c_int,
@@ -1217,13 +1217,13 @@ pub mod bsd44 {
                     pub ai_next: *mut addrinfo,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_un {
+                #[derive(Copy)] pub struct sockaddr_un {
                     pub sun_len: u8,
                     pub sun_family: sa_family_t,
                     pub sun_path: [c_char; 104]
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ifaddrs {
+                #[derive(Copy)] pub struct ifaddrs {
                     pub ifa_next: *mut ifaddrs,
                     pub ifa_name: *mut c_char,
                     pub ifa_flags: c_uint,
@@ -1291,7 +1291,7 @@ pub mod posix01 {
                 pub type fflags_t = u32;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_ino: ino_t,
                     pub st_nlink: nlink_t,
                     pub st_dev: dev_t,
@@ -1316,7 +1316,7 @@ pub mod posix01 {
                     pub st_qspare2: int64_t,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
@@ -1343,7 +1343,7 @@ pub mod posix01 {
                 // pub Note: this is the struct called stat64 in Windows. Not stat,
                 // nor stati64.
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub st_ino: ino_t,
                     pub st_mode: u16,
@@ -1359,24 +1359,24 @@ pub mod posix01 {
 
                 // note that this is called utimbuf64 in Windows
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time64_t,
                     pub modtime: time64_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timeval {
+                #[derive(Copy)] pub struct timeval {
                     pub tv_sec: c_long,
                     pub tv_usec: c_long,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timespec {
+                #[derive(Copy)] pub struct timespec {
                     pub tv_sec: time_t,
                     pub tv_nsec: c_long,
                 }
 
-                #[deriving(Copy)] pub enum timezone {}
+                #[derive(Copy)] pub enum timezone {}
             }
 
             pub mod bsd44 {
@@ -1389,30 +1389,30 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr {
+                #[derive(Copy)] pub struct sockaddr {
                     pub sa_family: sa_family_t,
                     pub sa_data: [u8; 14],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_storage {
+                #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_family: sa_family_t,
                     pub __ss_pad1: [u8; 6],
                     pub __ss_align: i64,
                     pub __ss_pad2: [u8; 112],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in {
+                #[derive(Copy)] pub struct sockaddr_in {
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
                     pub sin_addr: in_addr,
                     pub sin_zero: [u8; 8],
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in_addr {
+                #[derive(Copy)] pub struct in_addr {
                     pub s_addr: in_addr_t,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in6 {
+                #[derive(Copy)] pub struct sockaddr_in6 {
                     pub sin6_family: sa_family_t,
                     pub sin6_port: in_port_t,
                     pub sin6_flowinfo: u32,
@@ -1420,21 +1420,21 @@ pub mod bsd44 {
                     pub sin6_scope_id: u32,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in6_addr {
+                #[derive(Copy)] pub struct in6_addr {
                     pub s6_addr: [u16; 8]
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip_mreq {
+                #[derive(Copy)] pub struct ip_mreq {
                     pub imr_multiaddr: in_addr,
                     pub imr_interface: in_addr,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip6_mreq {
+                #[derive(Copy)] pub struct ip6_mreq {
                     pub ipv6mr_multiaddr: in6_addr,
                     pub ipv6mr_interface: c_uint,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct addrinfo {
+                #[derive(Copy)] pub struct addrinfo {
                     pub ai_flags: c_int,
                     pub ai_family: c_int,
                     pub ai_socktype: c_int,
@@ -1445,7 +1445,7 @@ pub mod bsd44 {
                     pub ai_next: *mut addrinfo,
                 }
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_un {
+                #[derive(Copy)] pub struct sockaddr_un {
                     pub sun_family: sa_family_t,
                     pub sun_path: [c_char; 108]
                 }
@@ -1573,7 +1573,7 @@ pub mod extra {
                 pub type LPCH = *mut CHAR;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct SECURITY_ATTRIBUTES {
+                #[derive(Copy)] pub struct SECURITY_ATTRIBUTES {
                     pub nLength: DWORD,
                     pub lpSecurityDescriptor: LPVOID,
                     pub bInheritHandle: BOOL,
@@ -1597,7 +1597,7 @@ pub mod extra {
                 pub type int64 = i64;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct STARTUPINFO {
+                #[derive(Copy)] pub struct STARTUPINFO {
                     pub cb: DWORD,
                     pub lpReserved: LPWSTR,
                     pub lpDesktop: LPWSTR,
@@ -1620,7 +1620,7 @@ pub mod extra {
                 pub type LPSTARTUPINFO = *mut STARTUPINFO;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct PROCESS_INFORMATION {
+                #[derive(Copy)] pub struct PROCESS_INFORMATION {
                     pub hProcess: HANDLE,
                     pub hThread: HANDLE,
                     pub dwProcessId: DWORD,
@@ -1629,7 +1629,7 @@ pub mod extra {
                 pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct SYSTEM_INFO {
+                #[derive(Copy)] pub struct SYSTEM_INFO {
                     pub wProcessorArchitecture: WORD,
                     pub wReserved: WORD,
                     pub dwPageSize: DWORD,
@@ -1645,7 +1645,7 @@ pub mod extra {
                 pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct MEMORY_BASIC_INFORMATION {
+                #[derive(Copy)] pub struct MEMORY_BASIC_INFORMATION {
                     pub BaseAddress: LPVOID,
                     pub AllocationBase: LPVOID,
                     pub AllocationProtect: DWORD,
@@ -1657,7 +1657,7 @@ pub mod extra {
                 pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct OVERLAPPED {
+                #[derive(Copy)] pub struct OVERLAPPED {
                     pub Internal: *mut c_ulong,
                     pub InternalHigh: *mut c_ulong,
                     pub Offset: DWORD,
@@ -1668,7 +1668,7 @@ pub mod extra {
                 pub type LPOVERLAPPED = *mut OVERLAPPED;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct FILETIME {
+                #[derive(Copy)] pub struct FILETIME {
                     pub dwLowDateTime: DWORD,
                     pub dwHighDateTime: DWORD,
                 }
@@ -1676,7 +1676,7 @@ pub mod extra {
                 pub type LPFILETIME = *mut FILETIME;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct GUID {
+                #[derive(Copy)] pub struct GUID {
                     pub Data1: DWORD,
                     pub Data2: WORD,
                     pub Data3: WORD,
@@ -1684,7 +1684,7 @@ pub mod extra {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct WSAPROTOCOLCHAIN {
+                #[derive(Copy)] pub struct WSAPROTOCOLCHAIN {
                     pub ChainLen: c_int,
                     pub ChainEntries: [DWORD; MAX_PROTOCOL_CHAIN as uint],
                 }
@@ -1692,7 +1692,7 @@ pub mod extra {
                 pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct WSAPROTOCOL_INFO {
+                #[derive(Copy)] pub struct WSAPROTOCOL_INFO {
                     pub dwServiceFlags1: DWORD,
                     pub dwServiceFlags2: DWORD,
                     pub dwServiceFlags3: DWORD,
@@ -1720,7 +1720,7 @@ pub mod extra {
                 pub type GROUP = c_uint;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct WIN32_FIND_DATAW {
+                #[derive(Copy)] pub struct WIN32_FIND_DATAW {
                     pub dwFileAttributes: DWORD,
                     pub ftCreationTime: FILETIME,
                     pub ftLastAccessTime: FILETIME,
@@ -1750,7 +1750,7 @@ pub mod posix01 {
                 pub type pthread_t = uintptr_t;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct glob_t {
+                #[derive(Copy)] pub struct glob_t {
                     pub gl_pathc:  size_t,
                     pub __unused1: c_int,
                     pub gl_offs:   size_t,
@@ -1767,18 +1767,18 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timeval {
+                #[derive(Copy)] pub struct timeval {
                     pub tv_sec: time_t,
                     pub tv_usec: suseconds_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct timespec {
+                #[derive(Copy)] pub struct timespec {
                     pub tv_sec: time_t,
                     pub tv_nsec: c_long,
                 }
 
-                #[deriving(Copy)] pub enum timezone {}
+                #[derive(Copy)] pub enum timezone {}
 
                 pub type sighandler_t = size_t;
             }
@@ -1792,14 +1792,14 @@ pub mod bsd44 {
                 pub type in_port_t = u16;
                 pub type in_addr_t = u32;
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr {
+                #[derive(Copy)] pub struct sockaddr {
                     pub sa_len: u8,
                     pub sa_family: sa_family_t,
                     pub sa_data: [u8; 14],
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_storage {
+                #[derive(Copy)] pub struct sockaddr_storage {
                     pub ss_len: u8,
                     pub ss_family: sa_family_t,
                     pub __ss_pad1: [u8; 6],
@@ -1808,7 +1808,7 @@ pub mod bsd44 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in {
+                #[derive(Copy)] pub struct sockaddr_in {
                     pub sin_len: u8,
                     pub sin_family: sa_family_t,
                     pub sin_port: in_port_t,
@@ -1817,12 +1817,12 @@ pub mod bsd44 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in_addr {
+                #[derive(Copy)] pub struct in_addr {
                     pub s_addr: in_addr_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_in6 {
+                #[derive(Copy)] pub struct sockaddr_in6 {
                     pub sin6_len: u8,
                     pub sin6_family: sa_family_t,
                     pub sin6_port: in_port_t,
@@ -1832,24 +1832,24 @@ pub mod bsd44 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct in6_addr {
+                #[derive(Copy)] pub struct in6_addr {
                     pub s6_addr: [u16; 8]
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip_mreq {
+                #[derive(Copy)] pub struct ip_mreq {
                     pub imr_multiaddr: in_addr,
                     pub imr_interface: in_addr,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ip6_mreq {
+                #[derive(Copy)] pub struct ip6_mreq {
                     pub ipv6mr_multiaddr: in6_addr,
                     pub ipv6mr_interface: c_uint,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct addrinfo {
+                #[derive(Copy)] pub struct addrinfo {
                     pub ai_flags: c_int,
                     pub ai_family: c_int,
                     pub ai_socktype: c_int,
@@ -1861,14 +1861,14 @@ pub mod bsd44 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct sockaddr_un {
+                #[derive(Copy)] pub struct sockaddr_un {
                     pub sun_len: u8,
                     pub sun_family: sa_family_t,
                     pub sun_path: [c_char; 104]
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct ifaddrs {
+                #[derive(Copy)] pub struct ifaddrs {
                     pub ifa_next: *mut ifaddrs,
                     pub ifa_name: *mut c_char,
                     pub ifa_flags: c_uint,
@@ -1931,7 +1931,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub st_mode: mode_t,
                     pub st_nlink: nlink_t,
@@ -1957,13 +1957,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __sig: c_long,
                     pub __opaque: [c_char; 36]
                 }
@@ -1974,7 +1974,7 @@ pub mod bsd44 {
             }
             pub mod extra {
                 #[repr(C)]
-                #[deriving(Copy)] pub struct mach_timebase_info {
+                #[derive(Copy)] pub struct mach_timebase_info {
                     pub numer: u32,
                     pub denom: u32,
                 }
@@ -2035,7 +2035,7 @@ pub mod posix01 {
                 pub type blkcnt_t = i32;
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct stat {
+                #[derive(Copy)] pub struct stat {
                     pub st_dev: dev_t,
                     pub st_mode: mode_t,
                     pub st_nlink: nlink_t,
@@ -2061,13 +2061,13 @@ pub mod posix01 {
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct utimbuf {
+                #[derive(Copy)] pub struct utimbuf {
                     pub actime: time_t,
                     pub modtime: time_t,
                 }
 
                 #[repr(C)]
-                #[deriving(Copy)] pub struct pthread_attr_t {
+                #[derive(Copy)] pub struct pthread_attr_t {
                     pub __sig: c_long,
                     pub __opaque: [c_char; 56]
                 }
@@ -2078,7 +2078,7 @@ pub mod bsd44 {
             }
             pub mod extra {
                 #[repr(C)]
-                #[deriving(Copy)] pub struct mach_timebase_info {
+                #[derive(Copy)] pub struct mach_timebase_info {
                     pub numer: u32,
                     pub denom: u32,
                 }
index 7e21f5f48f16389b9b8d8d45f919d44c933d393f..8134503019c99ad9362232e9a47e892bb084a5c2 100644 (file)
@@ -12,7 +12,7 @@
 use std::ascii::AsciiExt;
 use std::cmp;
 
-#[deriving(Show, Clone)]
+#[derive(Show, Clone)]
 pub struct LogDirective {
     pub name: Option<String>,
     pub level: u32,
index 4ee5b2d5e834991db0dcde74e74ceef76a1d92f2..0508402ff19d8cd96f79b95bb5de8548d43516a2 100644 (file)
@@ -232,7 +232,7 @@ struct DefaultLogger {
 }
 
 /// Wraps the log level with fmt implementations.
-#[deriving(Copy, PartialEq, PartialOrd)]
+#[derive(Copy, PartialEq, PartialOrd)]
 pub struct LogLevel(pub u32);
 
 impl fmt::Show for LogLevel {
@@ -319,7 +319,7 @@ pub fn set_logger(logger: Box<Logger + Send>) -> Option<Box<Logger + Send>> {
 
 /// A LogRecord is created by the logging macros, and passed as the only
 /// argument to Loggers.
-#[deriving(Show)]
+#[derive(Show)]
 pub struct LogRecord<'a> {
 
     /// The module path of where the LogRecord originated.
@@ -339,7 +339,7 @@ pub struct LogRecord<'a> {
 }
 
 #[doc(hidden)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct LogLocation {
     pub module_path: &'static str,
     pub file: &'static str,
index 8e6c7de305f823edc50450f7055d633aeb7f14e8..0b1dd2e13b4718a78e2767dc42f10dc07a9e901a 100644 (file)
@@ -29,7 +29,7 @@
 /// [1]: D. J. Bernstein, [*ChaCha, a variant of
 /// Salsa20*](http://cr.yp.to/chacha.html)
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ChaChaRng {
     buffer:  [u32; STATE_WORDS], // Internal buffer of output
     state:   [u32; STATE_WORDS], // Initial state
index 981b0eeee53e0c55187dcbe2409ab26c3fefde29..580f8897885f6edb8d9be48b0f263d2048ffd29b 100644 (file)
@@ -29,7 +29,7 @@
 /// Generate Normal Random
 /// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield
 /// College, Oxford
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Exp1(pub f64);
 
 // This could be done via `-rng.gen::<f64>().ln()` but that is slower.
@@ -67,7 +67,7 @@ fn zero_case<R:Rng>(rng: &mut R, _u: f64) -> f64 {
 /// let v = exp.ind_sample(&mut rand::thread_rng());
 /// println!("{} is from a Exp(2) distribution", v);
 /// ```
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Exp {
     /// `lambda` stored as `1/lambda`, since this is what we scale by.
     lambda_inverse: f64
index d0123d9c76c997f8206341d6125f8e817fc3fb23..e684fcf40f7b37d19dac4896bbeebb36dced8307 100644 (file)
@@ -263,7 +263,7 @@ mod tests {
     use {Rng, Rand};
     use super::{RandSample, WeightedChoice, Weighted, Sample, IndependentSample};
 
-    #[deriving(PartialEq, Show)]
+    #[derive(PartialEq, Show)]
     struct ConstRand(uint);
     impl Rand for ConstRand {
         fn rand<R: Rng>(_: &mut R) -> ConstRand {
index 543e236f96dd2ab0c451b4120b35cd54696a1f33..2e1a433eb075e43ea932ef78f8e4e1a4a17ca897 100644 (file)
@@ -28,7 +28,7 @@
 /// Generate Normal Random
 /// Samples*](http://www.doornik.com/research/ziggurat.pdf). Nuffield
 /// College, Oxford
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct StandardNormal(pub f64);
 
 impl Rand for StandardNormal {
@@ -84,7 +84,7 @@ fn zero_case<R:Rng>(rng: &mut R, u: f64) -> f64 {
 /// let v = normal.ind_sample(&mut rand::thread_rng());
 /// println!("{} is from a N(2, 9) distribution", v)
 /// ```
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Normal {
     mean: f64,
     std_dev: f64,
@@ -132,7 +132,7 @@ fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
 /// let v = log_normal.ind_sample(&mut rand::thread_rng());
 /// println!("{} is from an ln N(2, 9) distribution", v)
 /// ```
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct LogNormal {
     norm: Normal
 }
index 1ea4784407592d44b95bbe4dea2da79619cf9db8..af90a0a308dc9bc76be5428e4fe439ec7f3cd768 100644 (file)
@@ -29,7 +29,7 @@
 ///
 /// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
 /// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html)
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct IsaacRng {
     cnt: u32,
     rsl: [u32; RAND_SIZE_UINT],
@@ -264,7 +264,7 @@ fn rand<R: Rng>(other: &mut R) -> IsaacRng {
 ///
 /// [1]: Bob Jenkins, [*ISAAC: A fast cryptographic random number
 /// generator*](http://www.burtleburtle.net/bob/rand/isaacafa.html)
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Isaac64Rng {
     cnt: uint,
     rsl: [u64; RAND_SIZE_64],
index 46371d427e63fba95ad0cd60f01f00d9d5102fee..795e8fab85692e6929ab623f7b8933c5cb65c080 100644 (file)
@@ -133,7 +133,7 @@ pub trait Reseeder<R> {
 
 /// Reseed an RNG using a `Default` instance. This reseeds by
 /// replacing the RNG with the result of a `Default::default` call.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ReseedWithDefault;
 
 impl<R: Rng + Default> Reseeder<R> for ReseedWithDefault {
index 5bfe7e15a930764c25dfbb9a52cbff1ff0fea56a..31fb504ba3d0115eb81f007bb7913d153fe221c7 100644 (file)
@@ -41,7 +41,7 @@
 pub mod io;
 
 /// Common data structures
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct Doc<'a> {
     pub data: &'a [u8],
     pub start: uint,
@@ -71,7 +71,7 @@ pub struct TaggedDoc<'a> {
     pub doc: Doc<'a>,
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum EbmlEncoderTag {
     EsUint,     // 0
     EsU64,      // 1
@@ -105,7 +105,7 @@ pub enum EbmlEncoderTag {
     EsLabel, // Used only when debugging
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub enum Error {
     IntTooBig(uint),
     Expected(String),
@@ -147,7 +147,7 @@ macro_rules! try_or {
         )
     }
 
-    #[deriving(Copy)]
+    #[derive(Copy)]
     pub struct Res {
         pub val: uint,
         pub next: uint
index 1476e6ab8a7068669c5e8b81edc13cb0e1bb2660..d29a7a425c1164d1825549f49a99305377d89a95 100644 (file)
@@ -25,7 +25,7 @@
 
 type InstIdx = uint;
 
-#[deriving(Show, Clone)]
+#[derive(Show, Clone)]
 pub enum Inst {
     // When a Match instruction is executed, the current thread is successful.
     Match,
@@ -78,7 +78,7 @@ pub enum Inst {
 /// All of the data in a compiled expression is wrapped in "MaybeStatic" or
 /// "MaybeOwned" types so that a `Program` can be represented as static data.
 /// (This makes it convenient and efficient for use with the `regex!` macro.)
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Program {
     /// A sequence of instructions.
     pub insts: Vec<Inst>,
index 692a065299ca2b25a21d39c6f515a760c7fc87b9..07da86afcc9719834b50a60710c3d2104d628133 100644 (file)
@@ -52,7 +52,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 ///
 /// Note that this representation prevents one from reproducing the regex as
 /// it was typed. (But it could be used to reproduce an equivalent regex.)
-#[deriving(Show, Clone)]
+#[derive(Show, Clone)]
 pub enum Ast {
     Nothing,
     Literal(char, Flags),
@@ -69,14 +69,14 @@ pub enum Ast {
     Rep(Box<Ast>, Repeater, Greed),
 }
 
-#[deriving(Show, PartialEq, Clone)]
+#[derive(Show, PartialEq, Clone)]
 pub enum Repeater {
     ZeroOne,
     ZeroMore,
     OneMore,
 }
 
-#[deriving(Copy, Show, Clone)]
+#[derive(Copy, Show, Clone)]
 pub enum Greed {
     Greedy,
     Ungreedy,
@@ -103,7 +103,7 @@ fn swap(self, swapped: bool) -> Greed {
 /// constructing an abstract syntax tree. Its central purpose is to facilitate
 /// parsing groups and alternations while also maintaining a stack of flag
 /// state.
-#[deriving(Show)]
+#[derive(Show)]
 enum BuildAst {
     Expr(Ast),
     Paren(Flags, uint, String), // '('
index 69c58eebd56d05ea5023e2bf69576d6f247ad90b..8edbf263d74003940f972adb4172d2d74257bd69 100644 (file)
@@ -104,7 +104,7 @@ pub fn is_match(regex: &str, text: &str) -> Result<bool, parse::Error> {
 /// makes it much faster when searching text.
 /// More details about the `regex!` macro can be found in the `regex` crate
 /// documentation.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum Regex {
     // The representation of `Regex` is exported to support the `regex!`
     // syntax extension. Do not rely on it.
@@ -117,7 +117,7 @@ pub enum Regex {
     Native(ExNative),
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 #[doc(hidden)]
 pub struct ExDynamic {
     original: String,
@@ -127,7 +127,7 @@ pub struct ExDynamic {
 }
 
 #[doc(hidden)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ExNative {
     #[doc(hidden)]
     pub original: &'static str,
@@ -540,7 +540,7 @@ fn names_len(&self) -> uint {
 
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum NamesIter<'a> {
     NamesIterNative(::std::slice::Iter<'a, Option<&'static str>>),
     NamesIterDynamic(::std::slice::Iter<'a, Option<String>>)
@@ -599,7 +599,7 @@ fn reg_replace<'a>(&'a mut self, caps: &Captures) -> CowString<'a> {
 ///
 /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime
 /// of the string being split.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct RegexSplits<'r, 't> {
     finder: FindMatches<'r, 't>,
     last: uint,
@@ -635,7 +635,7 @@ fn next(&mut self) -> Option<&'t str> {
 ///
 /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime
 /// of the string being split.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct RegexSplitsN<'r, 't> {
     splits: RegexSplits<'r, 't>,
     cur: uint,
@@ -801,7 +801,7 @@ pub fn is_empty(&self) -> bool { self.len() == 0 }
 /// expression.
 ///
 /// `'t` is the lifetime of the matched text.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SubCaptures<'t> {
     idx: uint,
     caps: &'t Captures<'t>,
@@ -826,7 +826,7 @@ fn next(&mut self) -> Option<&'t str> {
 /// Positions are byte indices in terms of the original string matched.
 ///
 /// `'t` is the lifetime of the matched text.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SubCapturesPos<'t> {
     idx: uint,
     caps: &'t Captures<'t>,
@@ -852,7 +852,7 @@ fn next(&mut self) -> Option<Option<(uint, uint)>> {
 ///
 /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime
 /// of the matched string.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct FindCaptures<'r, 't> {
     re: &'r Regex,
     search: &'t str,
@@ -897,7 +897,7 @@ fn next(&mut self) -> Option<Captures<'t>> {
 ///
 /// `'r` is the lifetime of the compiled expression and `'t` is the lifetime
 /// of the matched string.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct FindMatches<'r, 't> {
     re: &'r Regex,
     search: &'t str,
index 79efebc64045e3b8d0e15ae2c373b700d805c031..914167019d20969fd01412b99ce643aaf52fc0c2 100644 (file)
@@ -52,7 +52,7 @@
 pub type CaptureLocs = Vec<Option<uint>>;
 
 /// Indicates the type of match to be performed by the VM.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum MatchKind {
     /// Only checks if a match exists or not. Does not return location.
     Exists,
@@ -97,7 +97,7 @@ struct Nfa<'r, 't> {
 
 /// Indicates the next action to take after a single non-empty instruction
 /// is processed.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum StepState {
     /// This is returned if and only if a Match instruction is reached and
     /// we only care about the existence of a match. It instructs the VM to
index 382b889ed219a37cf427ff548e7689dbfafc13ec..8f03f8821285a47c24d951abb92d114d3d651beb 100644 (file)
@@ -57,7 +57,7 @@
     "suggest using `loop { }` instead of `while true { }`"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct WhileTrue;
 
 impl LintPass for WhileTrue {
@@ -83,7 +83,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
     "detects unnecessary type casts that can be removed"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedCasts;
 
 impl LintPass for UnusedCasts {
@@ -125,7 +125,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
     "shift exceeds the type's number of bits"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct TypeLimits {
     /// Id of the last visited negated expression
     negated_expr_id: ast::NodeId,
@@ -442,7 +442,7 @@ fn visit_ty(&mut self, ty: &ast::Ty) {
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ImproperCTypes;
 
 impl LintPass for ImproperCTypes {
@@ -485,7 +485,7 @@ fn check_foreign_fn(cx: &Context, decl: &ast::FnDecl) {
     "use of owned (Box type) heap memory"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct BoxPointers;
 
 impl BoxPointers {
@@ -625,7 +625,7 @@ fn check_item(&mut self, cx: &Context, item: &ast::Item) {
     "detects attributes that were not used by the compiler"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedAttributes;
 
 impl LintPass for UnusedAttributes {
@@ -709,7 +709,7 @@ fn check_attribute(&mut self, cx: &Context, attr: &ast::Attribute) {
     "path statements with no effect"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct PathStatements;
 
 impl LintPass for PathStatements {
@@ -743,7 +743,7 @@ fn check_stmt(&mut self, cx: &Context, s: &ast::Stmt) {
     "unused result of an expression in a statement"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedResults;
 
 impl LintPass for UnusedResults {
@@ -811,7 +811,7 @@ fn check_must_use(cx: &Context, attrs: &[ast::Attribute], sp: Span) -> bool {
     "types, variants, traits and type parameters should have camel case names"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NonCamelCaseTypes;
 
 impl NonCamelCaseTypes {
@@ -884,7 +884,7 @@ fn check_generics(&mut self, cx: &Context, it: &ast::Generics) {
     }
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum MethodContext {
     TraitDefaultImpl,
     TraitImpl,
@@ -934,7 +934,7 @@ fn method_context(cx: &Context, m: &ast::Method) -> MethodContext {
     "methods, functions, lifetime parameters and modules should have snake case names"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NonSnakeCase;
 
 impl NonSnakeCase {
@@ -1047,7 +1047,7 @@ fn check_struct_def(&mut self, cx: &Context, s: &ast::StructDef,
     "static constants should have uppercase identifiers"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NonUpperCaseGlobals;
 
 impl LintPass for NonUpperCaseGlobals {
@@ -1100,7 +1100,7 @@ fn check_pat(&mut self, cx: &Context, p: &ast::Pat) {
     "`if`, `match`, `while` and `return` do not need parentheses"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedParens;
 
 impl UnusedParens {
@@ -1194,7 +1194,7 @@ fn check_stmt(&mut self, cx: &Context, s: &ast::Stmt) {
     "unnecessary braces around an imported item"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedImportBraces;
 
 impl LintPass for UnusedImportBraces {
@@ -1233,7 +1233,7 @@ fn check_view_item(&mut self, cx: &Context, view_item: &ast::ViewItem) {
     "using `Struct { x: x }` instead of `Struct { x }`"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NonShorthandFieldPatterns;
 
 impl LintPass for NonShorthandFieldPatterns {
@@ -1266,7 +1266,7 @@ fn check_pat(&mut self, cx: &Context, pat: &ast::Pat) {
     "unnecessary use of an `unsafe` block"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedUnsafe;
 
 impl LintPass for UnusedUnsafe {
@@ -1291,7 +1291,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
     "usage of an `unsafe` block"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnsafeBlocks;
 
 impl LintPass for UnsafeBlocks {
@@ -1315,7 +1315,7 @@ fn check_expr(&mut self, cx: &Context, e: &ast::Expr) {
     "detect mut variables which don't need to be mutable"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedMut;
 
 impl UnusedMut {
@@ -1384,7 +1384,7 @@ fn check_fn(&mut self, cx: &Context,
     "detects unnecessary allocations that can be eliminated"
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnusedAllocation;
 
 impl LintPass for UnusedAllocation {
@@ -1575,7 +1575,7 @@ fn check_variant_post(&mut self, _: &Context, _: &ast::Variant, _: &ast::Generic
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct MissingCopyImplementations;
 
 impl LintPass for MissingCopyImplementations {
@@ -1646,7 +1646,7 @@ fn check_item(&mut self, cx: &Context, item: &ast::Item) {
 
 /// Checks for use of items with `#[deprecated]`, `#[experimental]` and
 /// `#[unstable]` attributes, or no stability attribute.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Stability;
 
 impl Stability {
@@ -1857,7 +1857,7 @@ fn check_item(&mut self, cx: &Context, item: &ast::Item) {
 
 /// Does nothing as a lint pass, but registers some `Lint`s
 /// which are used by other parts of the compiler.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct HardwiredLints;
 
 impl LintPass for HardwiredLints {
index 787e999eea9f1eac75f33a8d3ac85f5714ede8e8..461a67ba93793cbe7d62124c67480afbe15316cd 100644 (file)
@@ -42,7 +42,7 @@
 pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs};
 
 /// Specification of a single lint.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Lint {
     /// A string identifier for the lint.
     ///
@@ -174,7 +174,7 @@ fn exit_lint_attrs(&mut self, _: &Context, _: &[ast::Attribute]) { }
 pub type LintPassObject = Box<LintPass + 'static>;
 
 /// Identifies a lint known to the compiler.
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct LintId {
     // Identity is based on pointer equality of this field.
     lint: &'static Lint,
@@ -210,7 +210,7 @@ pub fn as_str(&self) -> String {
 }
 
 /// Setting for how to handle a lint.
-#[deriving(Clone, Copy, PartialEq, PartialOrd, Eq, Ord)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord)]
 pub enum Level {
     Allow, Warn, Deny, Forbid
 }
@@ -239,7 +239,7 @@ pub fn from_str(x: &str) -> Option<Level> {
 }
 
 /// How a lint level was set.
-#[deriving(Clone, Copy, PartialEq, Eq)]
+#[derive(Clone, Copy, PartialEq, Eq)]
 pub enum LintSource {
     /// Lint is at the default level as declared
     /// in rustc or a plugin.
index 2a58da8cb3be78825b8ccba819e692c144bdea25..cc21243b81d8db45c00ddb877f86e2edd69967dd 100644 (file)
@@ -113,7 +113,7 @@ impl items contain tag_item_impl_item elements, and classes
 pub const tag_items_data_item_reexport_name: uint = 0x3a;
 
 // used to encode crate_ctxt side tables
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 #[repr(uint)]
 pub enum astencode_tag { // Reserves 0x40 -- 0x5f
     tag_ast = 0x40,
@@ -219,7 +219,7 @@ pub fn from_uint(value : uint) -> Option<astencode_tag> {
 
 pub const tag_items_data_item_repr: uint = 0x93;
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct LinkMeta {
     pub crate_name: String,
     pub crate_hash: Svh,
index 2b11b8517b0d87658b3ec8f416688e919470dcdf..1401a7d4a1a6ee564181a98153ee048d5875c3ad 100644 (file)
@@ -32,7 +32,7 @@
 
 use std::collections::hash_map::HashMap;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct MethodInfo {
     pub name: ast::Name,
     pub def_id: ast::DefId,
index d5247472c34478fab57665d22a8d91d91c042b28..2f4acaca4de4d3eda8f5f1223da3182d9bd89f15 100644 (file)
@@ -48,13 +48,13 @@ pub struct crate_metadata {
     pub span: Span,
 }
 
-#[deriving(Copy, Show, PartialEq, Clone)]
+#[derive(Copy, Show, PartialEq, Clone)]
 pub enum LinkagePreference {
     RequireDynamic,
     RequireStatic,
 }
 
-#[deriving(Copy, Clone, PartialEq, FromPrimitive)]
+#[derive(Copy, Clone, PartialEq, FromPrimitive)]
 pub enum NativeLibraryKind {
     NativeStatic,    // native static library (.a archive)
     NativeFramework, // OSX-specific
@@ -63,7 +63,7 @@ pub enum NativeLibraryKind {
 
 // Where a crate came from on the local filesystem. One of these two options
 // must be non-None.
-#[deriving(PartialEq, Clone)]
+#[derive(PartialEq, Clone)]
 pub struct CrateSource {
     pub dylib: Option<Path>,
     pub rlib: Option<Path>,
index 3ae9525e4b525e8ceb76e297fc8b9a1bb7b57384..97f5228f0330b5ca98a988d15215ff433e47052d 100644 (file)
@@ -111,7 +111,7 @@ fn lookup_item<'a>(item_id: ast::NodeId, data: &'a [u8]) -> rbml::Doc<'a> {
     find_item(item_id, items)
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum Family {
     ImmStatic,             // c
     MutStatic,             // b
@@ -471,7 +471,7 @@ pub fn get_symbol(data: &[u8], id: ast::NodeId) -> String {
 }
 
 // Something that a name can resolve to.
-#[deriving(Copy, Clone, Show)]
+#[derive(Copy, Clone, Show)]
 pub enum DefLike {
     DlDef(def::Def),
     DlImpl(ast::DefId),
@@ -1173,7 +1173,7 @@ pub fn get_crate_attributes(data: &[u8]) -> Vec<ast::Attribute> {
     get_attributes(rbml::Doc::new(data))
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct CrateDep {
     pub cnum: ast::CrateNum,
     pub name: String,
index fd2650939cdb08202562002689b12032be19ed77..75b9a18063e2821f9e37372b376ea51734973c91 100644 (file)
@@ -98,7 +98,7 @@ pub fn encode_def_id(rbml_w: &mut Encoder, id: DefId) {
     rbml_w.wr_tagged_str(tag_def_id, def_to_string(id)[]);
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 struct entry<T> {
     val: T,
     pos: u64
index 82071931fe3a654253b4907350f2c321d22efd38..29625d0a6afac63c8a34ba609fe4aaa6d5d30405 100644 (file)
@@ -20,7 +20,7 @@
 use util::fs as myfs;
 use session::search_paths::{SearchPaths, PathKind};
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum FileMatch {
     FileMatches,
     FileDoesntMatch,
index 066bc6d0932d750c87178bf4efefa0ea62771528..80b13aac89fc8f2feb1aaa4293d7e143323d2d0e 100644 (file)
@@ -43,7 +43,7 @@
 // def-id will depend on where it originated from.  Therefore, the conversion
 // function is given an indicator of the source of the def-id.  See
 // astencode.rs for more information.
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum DefIdSource {
     // Identifies a struct, trait, enum, etc.
     NominalType,
index a7b28a6323eaff7e09d43f18e6180bbad77b1003..ff5175ffdcfb2a3cc73021c9c835cd21db691ec8 100644 (file)
@@ -26,7 +26,7 @@ struct CFGBuilder<'a, 'tcx: 'a> {
     loop_scopes: Vec<LoopScope>,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 struct LoopScope {
     loop_id: ast::NodeId,     // id of loop/while node
     continue_index: CFGIndex, // where to go on a `loop`
index e1c5906f0fb83f5d49f33959a89b806697f5e60b..0ca146a295e139a95712377578205699febcae97 100644 (file)
@@ -26,7 +26,7 @@ pub struct CFG {
     pub exit: CFGIndex,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct CFGNodeData {
     pub id: ast::NodeId
 }
index 5a08d7c179d1cc238466f96fb534182a8ea0ebb7..e68a9fb50efd0f6e5ed0d3ae82660a7f6cc7ce81 100644 (file)
 use syntax::visit::Visitor;
 use syntax::visit;
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 enum Context {
     Normal, Loop, Closure
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 struct CheckLoopVisitor<'a> {
     sess: &'a Session,
     cx: Context
index 64cfd293ee474afb393d207ff040ad1d451933cc..2d9284846acf349060192a44454f7945c536ad9b 100644 (file)
@@ -102,7 +102,7 @@ pub struct MatchCheckCtxt<'a, 'tcx: 'a> {
     pub param_env: ParameterEnvironment<'a, 'tcx>,
 }
 
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub enum Constructor {
     /// The constructor of all patterns that don't vary by constructor,
     /// e.g. struct patterns and fixed-length arrays.
@@ -119,14 +119,14 @@ pub enum Constructor {
     SliceWithSubslice(uint, uint)
 }
 
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 enum Usefulness {
     Useful,
     UsefulWithWitness(Vec<P<Pat>>),
     NotUseful
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum WitnessPreference {
     ConstructWitness,
     LeaveOutWitness
index 9c9e68002c980d9c40e2c6b5b2177f019b54aa5e..df51cb7e6bc4b3078c83cb9300640aea1d5be434 100644 (file)
@@ -39,7 +39,7 @@
 use syntax::codemap::Span;
 use syntax::visit;
 
-#[deriving(Copy, Eq, PartialEq)]
+#[derive(Copy, Eq, PartialEq)]
 enum Mode {
     InConstant,
     InStatic,
index e392026e0bc9937bcef76ec9df7c2b4d692001a2..a62b134c48e71d9a1547bb398adffca87641f8d2 100644 (file)
@@ -62,7 +62,7 @@
 //   - Non-constants: everything else.
 //
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum constness {
     integral_const,
     general_const,
@@ -294,7 +294,7 @@ pub fn process_crate(tcx: &ty::ctxt) {
 
 // FIXME (#33): this doesn't handle big integer/float literals correctly
 // (nor does the rest of our literal handling).
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub enum const_val {
     const_float(f64),
     const_int(i64),
index 6cf6065de19f0ee90e6942ac161cd4e88d5e91a4..e78b8047f695867ad51e875c90e4cb8a358addd0 100644 (file)
 use syntax::print::{pp, pprust};
 use util::nodemap::NodeMap;
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum EntryOrExit {
     Entry,
     Exit,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct DataFlowContext<'a, 'tcx: 'a, O> {
     tcx: &'a ty::ctxt<'tcx>,
 
index acbb7d567dceac8b253230a17d00fb9163e0e08c..2e4aa787e844b723e56b683c33c575a212d12294 100644 (file)
@@ -20,7 +20,7 @@
 
 use std::cell::RefCell;
 
-#[deriving(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Def {
     DefFn(ast::DefId, bool /* is_ctor */),
     DefStaticMethod(/* method */ ast::DefId, MethodProvenance),
@@ -68,19 +68,19 @@ pub enum Def {
 // within.
 pub type ExportMap = NodeMap<Vec<Export>>;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Export {
     pub name: ast::Name,    // The name of the target.
     pub def_id: ast::DefId, // The definition of the target.
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum MethodProvenance {
     FromTrait(ast::DefId),
     FromImpl(ast::DefId),
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum TyParamProvenance {
     FromSelf(ast::DefId),
     FromParam(ast::DefId),
@@ -106,7 +106,7 @@ pub fn def_id(&self) -> ast::DefId {
     }
 }
 
-#[deriving(Clone, Copy, Eq, PartialEq)]
+#[derive(Clone, Copy, Eq, PartialEq)]
 pub enum TraitItemKind {
     NonstaticMethodTraitItemKind,
     StaticMethodTraitItemKind,
index 927275c7389567a2445a8aa9434515cc0eb06e99..1075263e7512de7b34eb77aa71a339f01a24f5ef 100644 (file)
@@ -23,7 +23,7 @@
 use syntax::visit;
 use syntax::visit::Visitor;
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum UnsafeContext {
     SafeContext,
     UnsafeFn,
index 827e8ef9fb9534b4376814f7f86b5eaa6f1f38b4..5b786ec99224723bb254790390f25dd904ee096b 100644 (file)
@@ -95,7 +95,7 @@ fn mutate(&mut self,
               mode: MutateMode);
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum LoanCause {
     ClosureCapture(Span),
     AddrOf,
@@ -107,20 +107,20 @@ pub enum LoanCause {
     MatchDiscriminant
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum ConsumeMode {
     Copy,                // reference to x where x has a type that copies
     Move(MoveReason),    // reference to x where x has a type that moves
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum MoveReason {
     DirectRefMove,
     PatBindingMove,
     CaptureMove,
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum MatchMode {
     NonBindingMatch,
     BorrowingMatch,
@@ -128,7 +128,7 @@ pub enum MatchMode {
     MovingMatch,
 }
 
-#[deriving(PartialEq,Show)]
+#[derive(PartialEq,Show)]
 enum TrackMatchMode<T> {
     Unknown,
     Definite(MatchMode),
@@ -197,14 +197,14 @@ fn match_mode(&self) -> MatchMode {
     }
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum MutateMode {
     Init,
     JustWrite,    // x = y
     WriteAndRead, // x += y
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum OverloadedCallType {
     FnOverloadedCall,
     FnMutOverloadedCall,
index 40b8e60d296b91520752a030575debf6ad63a22a..d42817bce9302a911584a95118aaf5905862bc69 100644 (file)
@@ -14,7 +14,7 @@
 use self::SimplifiedType::*;
 
 /// See `simplify_type
-#[deriving(Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
 pub enum SimplifiedType {
     BoolSimplifiedType,
     CharSimplifiedType,
index e8efdda3888a71aee027fde148870e56112920fa..52b6af76081702d86109131490dffbe85bb69bdc 100644 (file)
@@ -61,18 +61,18 @@ fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
     }
 }
 
-#[deriving(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Show)]
 pub struct NodeIndex(pub uint);
 #[allow(non_upper_case_globals)]
 pub const InvalidNodeIndex: NodeIndex = NodeIndex(uint::MAX);
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub struct EdgeIndex(pub uint);
 #[allow(non_upper_case_globals)]
 pub const InvalidEdgeIndex: EdgeIndex = EdgeIndex(uint::MAX);
 
 // Use a private field here to guarantee no more instances are created:
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub struct Direction { repr: uint }
 #[allow(non_upper_case_globals)]
 pub const Outgoing: Direction = Direction { repr: 0 };
index f7d7fc81e0dbf983a844b931fbd5ed0c3b1f4688..29507058761154952096e908b058d2d19de6a4e2 100644 (file)
@@ -447,7 +447,7 @@ fn combine<C:Combine<'tcx>>(combiner: &C,
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct CombineFields<'a, 'tcx: 'a> {
     pub infcx: &'a InferCtxt<'a, 'tcx>,
     pub a_is_expected: bool,
index 8c3ee83e40d940166cb70d4e113a09b3fbc9c3d9..e1401898f7a79582985ff1a1ccd667ca9785f4c2 100644 (file)
@@ -97,7 +97,7 @@ pub struct InferCtxt<'a, 'tcx: 'a> {
 /// Why did we require that the two types be related?
 ///
 /// See `error_reporting.rs` for more details
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub enum TypeOrigin {
     // Not yet categorized in a better way
     Misc(Span),
@@ -135,7 +135,7 @@ pub enum TypeOrigin {
 }
 
 /// See `error_reporting.rs` for more details
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum ValuePairs<'tcx> {
     Types(ty::expected_found<Ty<'tcx>>),
     TraitRefs(ty::expected_found<Rc<ty::TraitRef<'tcx>>>),
@@ -146,7 +146,7 @@ pub enum ValuePairs<'tcx> {
 /// encounter an error or subtyping constraint.
 ///
 /// See `error_reporting.rs` for more details.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct TypeTrace<'tcx> {
     origin: TypeOrigin,
     values: ValuePairs<'tcx>,
@@ -155,7 +155,7 @@ pub struct TypeTrace<'tcx> {
 /// The origin of a `r1 <= r2` constraint.
 ///
 /// See `error_reporting.rs` for more details
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum SubregionOrigin<'tcx> {
     // Arose from a subtyping relation
     Subtype(TypeTrace<'tcx>),
@@ -224,7 +224,7 @@ pub enum SubregionOrigin<'tcx> {
 }
 
 /// Times when we replace late-bound regions with variables:
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub enum LateBoundRegionConversionTime {
     /// when a fn is called
     FnCall,
@@ -239,7 +239,7 @@ pub enum LateBoundRegionConversionTime {
 /// Reasons to create a region inference variable
 ///
 /// See `error_reporting.rs` for more details
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum RegionVariableOrigin<'tcx> {
     // Region variables created for ill-categorized reasons,
     // mostly indicates places in need of refactoring
@@ -272,7 +272,7 @@ pub enum RegionVariableOrigin<'tcx> {
     BoundRegionInCoherence(ast::Name),
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum fixup_err {
     unresolved_int_ty(IntVid),
     unresolved_float_ty(FloatVid),
index f31c0d509c538a101a1045b8981f93149c411969..7bc4bf1f4fe28db62b3cab5b288d7438b2df48ae 100644 (file)
@@ -121,7 +121,7 @@ struct ConstraintGraph<'a, 'tcx: 'a> {
     node_ids: FnvHashMap<Node, uint>,
 }
 
-#[deriving(Clone, Hash, PartialEq, Eq, Show)]
+#[derive(Clone, Hash, PartialEq, Eq, Show)]
 enum Node {
     RegionVid(ty::RegionVid),
     Region(ty::Region),
index 9c1aa673ccfa787c547686fe506dbfddc1b01604..f0ee63c08e8b60a86f1cd6a7c5a354d37536133f 100644 (file)
@@ -42,7 +42,7 @@
 mod graphviz;
 
 // A constraint that influences the inference process.
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub enum Constraint {
     // One region variable is subregion of another
     ConstrainVarSubVar(RegionVid, RegionVid),
@@ -69,13 +69,13 @@ pub enum Verify<'tcx> {
     VerifyParamBound(ty::ParamTy, SubregionOrigin<'tcx>, Region, Vec<Region>),
 }
 
-#[deriving(Copy, PartialEq, Eq, Hash)]
+#[derive(Copy, PartialEq, Eq, Hash)]
 pub struct TwoRegions {
     a: Region,
     b: Region,
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum UndoLogEntry {
     OpenSnapshot,
     CommitedSnapshot,
@@ -86,12 +86,12 @@ pub enum UndoLogEntry {
     AddCombination(CombineMapType, TwoRegions)
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum CombineMapType {
     Lub, Glb
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum RegionResolutionError<'tcx> {
     /// `ConcreteFailure(o, a, b)`:
     ///
@@ -143,7 +143,7 @@ pub enum RegionResolutionError<'tcx> {
 /// ```
 /// would report an error because we expect 'a and 'b to match, and so we group
 /// 'a and 'b together inside a SameRegions struct
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct SameRegions {
     pub scope_id: ast::NodeId,
     pub regions: Vec<BoundRegion>
@@ -217,7 +217,7 @@ pub struct RegionVarBindings<'a, 'tcx: 'a> {
     values: RefCell<Option<Vec<VarValue>>>,
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 #[allow(missing_copy_implementations)]
 pub struct RegionSnapshot {
     length: uint,
@@ -937,10 +937,10 @@ fn intersect_scopes(&self,
 
 // ______________________________________________________________________
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 enum Classification { Expanding, Contracting }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum VarValue { NoValue, Value(Region), ErrorValue }
 
 struct VarData {
index 30cf0318aad0ba982c758eeffb4e6efdcff1e005..2aacc863f54c9ea1780193f4d1fc96f60dd0bb6d 100644 (file)
@@ -46,7 +46,7 @@ enum UndoEntry {
 
 type Relation = (RelationDir, ty::TyVid);
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum RelationDir {
     SubtypeOf, SupertypeOf, EqTo
 }
index 03e00ef67695307a0c2d046e5d248d900e7842ac..73da96445934c53e51da700b17e5483b47a2cc8b 100644 (file)
@@ -62,7 +62,7 @@ pub trait UnifyValue<'tcx> : Clone + Repr<'tcx> + PartialEq {
 /// to keep the DAG relatively balanced, which helps keep the running
 /// time of the algorithm under control. For more information, see
 /// <http://en.wikipedia.org/wiki/Disjoint-set_data_structure>.
-#[deriving(PartialEq,Clone)]
+#[derive(PartialEq,Clone)]
 pub enum VarValue<K,V> {
     Redirect(K),
     Root(V, uint),
@@ -90,7 +90,7 @@ pub struct Node<K,V> {
     pub rank: uint,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Delegate;
 
 // We can't use V:LatticeValue, much as I would like to,
index 78fabcd588a28353ea6021f9535895089971f516..bbb11b9f93bbdde2f3e805ed32210c8dcc021b7f 100644 (file)
@@ -46,7 +46,7 @@ macro_rules! lets_do_this {
         $( $variant:ident, $name:expr, $method:ident; )*
     ) => {
 
-#[deriving(Copy, FromPrimitive, PartialEq, Eq, Hash)]
+#[derive(Copy, FromPrimitive, PartialEq, Eq, Hash)]
 pub enum LangItem {
     $($variant),*
 }
index b6ce8fa8d2ed6027729db4b5ae6b2192bd6ee42b..75d5b4fd7f932dcefec592aeb3c832b87e696357 100644 (file)
@@ -138,10 +138,10 @@ enum LoopKind<'a> {
     ForLoop(&'a ast::Pat),
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 struct Variable(uint);
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 struct LiveNode(uint);
 
 impl Variable {
@@ -158,7 +158,7 @@ fn clone(&self) -> LiveNode {
     }
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 enum LiveNodeKind {
     FreeVarNode(Span),
     ExprNode(Span),
@@ -244,13 +244,13 @@ struct CaptureInfo {
     var_nid: NodeId
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 struct LocalInfo {
     id: NodeId,
     ident: ast::Ident
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 enum VarKind {
     Arg(NodeId, ast::Ident),
     Local(LocalInfo),
@@ -529,7 +529,7 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) {
 // Actually we compute just a bit more than just liveness, but we use
 // the same basic propagation framework in all cases.
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 struct Users {
     reader: LiveNode,
     writer: LiveNode,
@@ -544,7 +544,7 @@ fn invalid_users() -> Users {
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 struct Specials {
     exit_ln: LiveNode,
     fallthrough_ln: LiveNode,
index 969c0a0f6f323a176d3580cea743a54169b11d9f..8325cebf1ed75e80403aeb4339244855232b3947 100644 (file)
@@ -87,7 +87,7 @@
 use std::cell::RefCell;
 use std::rc::Rc;
 
-#[deriving(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Show)]
 pub enum categorization<'tcx> {
     cat_rvalue(ty::Region),                    // temporary val, argument is its scope
     cat_static_item,
@@ -101,7 +101,7 @@ pub enum categorization<'tcx> {
 }
 
 // Represents any kind of upvar
-#[deriving(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Show)]
 pub struct Upvar {
     pub id: ty::UpvarId,
     // Unboxed closure kinds are used even for old-style closures for simplicity
@@ -111,7 +111,7 @@ pub struct Upvar {
 }
 
 // different kinds of pointers:
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub enum PointerKind {
     Unique,
     BorrowedPtr(ty::BorrowKind, ty::Region),
@@ -121,25 +121,25 @@ pub enum PointerKind {
 
 // We use the term "interior" to mean "something reachable from the
 // base without a pointer dereference", e.g. a field
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub enum InteriorKind {
     InteriorField(FieldName),
     InteriorElement(ElementKind),
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub enum FieldName {
     NamedField(ast::Name),
     PositionalField(uint)
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub enum ElementKind {
     VecElement,
     OtherElement,
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub enum MutabilityCategory {
     McImmutable, // Immutable.
     McDeclared,  // Directly declared as mutable.
@@ -151,7 +151,7 @@ pub enum MutabilityCategory {
 // Upvar categorization can generate a variable number of nested
 // derefs.  The note allows detecting them without deep pattern
 // matching on the categorization.
-#[deriving(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Show)]
 pub enum Note {
     NoteClosureEnv(ty::UpvarId), // Deref through closure env
     NoteUpvarRef(ty::UpvarId),   // Deref through by-ref upvar
@@ -172,7 +172,7 @@ pub enum Note {
 // dereference, but its type is the type *before* the dereference
 // (`@T`). So use `cmt.ty` to find the type of the value in a consistent
 // fashion. For more details, see the method `cat_pattern`
-#[deriving(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Show)]
 pub struct cmt_<'tcx> {
     pub id: ast::NodeId,           // id of expr/pat producing this value
     pub span: Span,                // span of same expr/pat
@@ -186,7 +186,7 @@ pub struct cmt_<'tcx> {
 
 // We pun on *T to mean both actual deref of a ptr as well
 // as accessing of components:
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum deref_kind {
     deref_ptr(PointerKind),
     deref_interior(InteriorKind),
@@ -1296,13 +1296,13 @@ fn cat_pattern_<F>(&self, cmt: cmt<'tcx>, pat: &ast::Pat, op: &mut F)
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum InteriorSafety {
     InteriorUnsafe,
     InteriorSafe
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AliasableReason {
     AliasableBorrowed,
     AliasableClosure(ast::NodeId), // Aliasable due to capture Fn closure env
index 0d3ed13753c7cf61d8e153c48a2295e1b79a09dc..e6665699b7b7bd7ca06a68dba0413ce469e3fba9 100644 (file)
@@ -49,7 +49,7 @@
 // FIXME: dox
 pub type LastPrivateMap = NodeMap<LastPrivate>;
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum LastPrivate {
     LastMod(PrivateDep),
     // `use` directives (imports) can refer to two separate definitions in the
@@ -63,14 +63,14 @@ pub enum LastPrivate {
                type_used: ImportUse},
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum PrivateDep {
     AllPublic,
     DependsOn(ast::DefId),
 }
 
 // How an import is used.
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum ImportUse {
     Unused,       // The import is not used.
     Used,         // The import is used.
index c0820408e2eedb439fa265007e339dd67ba602c3..68e257bc0c5ec3079aacf457fa253bbad9e62024 100644 (file)
@@ -36,7 +36,7 @@
 /// placate the same deriving in `ty::FreeRegion`, but we may want to
 /// actually attach a more meaningful ordering to scopes than the one
 /// generated via deriving here.
-#[deriving(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
+#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, RustcEncodable,
            RustcDecodable, Show, Copy)]
 pub enum CodeExtent {
     Misc(ast::NodeId)
@@ -116,7 +116,7 @@ pub struct RegionMaps {
     terminating_scopes: RefCell<FnvHashSet<CodeExtent>>,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Context {
     var_parent: Option<ast::NodeId>,
 
index 809871c325597ee60c5cb5902c147266e741272a..5eb033a01bd5862bd361b36b67d14201a42d38ff 100644 (file)
@@ -33,7 +33,7 @@
 use syntax::visit::Visitor;
 use util::nodemap::NodeMap;
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show)]
 pub enum DefRegion {
     DefStaticRegion,
     DefEarlyBoundRegion(/* space */ subst::ParamSpace,
index 875c3f6e0d9e88835d5ceaaee19677a05d4c9f42..cd29ce28ac174f6aa15563fea3fe657694b74747 100644 (file)
@@ -28,7 +28,7 @@
 /// identify each in-scope parameter by an *index* and a *parameter
 /// space* (which indices where the parameter is defined; see
 /// `ParamSpace`).
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct Substs<'tcx> {
     pub types: VecPerParamSpace<Ty<'tcx>>,
     pub regions: RegionSubsts,
@@ -37,7 +37,7 @@ pub struct Substs<'tcx> {
 /// Represents the values to use when substituting lifetime parameters.
 /// If the value is `ErasedRegions`, then this subst is occurring during
 /// trans, and all region parameters will be replaced with `ty::ReStatic`.
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub enum RegionSubsts {
     ErasedRegions,
     NonerasedRegions(VecPerParamSpace<ty::Region>)
@@ -179,7 +179,7 @@ pub fn is_erased(&self) -> bool {
 ///////////////////////////////////////////////////////////////////////////
 // ParamSpace
 
-#[deriving(PartialOrd, Ord, PartialEq, Eq, Copy,
+#[derive(PartialOrd, Ord, PartialEq, Eq, Copy,
            Clone, Hash, RustcEncodable, RustcDecodable, Show)]
 pub enum ParamSpace {
     TypeSpace,  // Type parameters attached to a type definition, trait, or impl
@@ -213,7 +213,7 @@ pub fn from_uint(u: uint) -> ParamSpace {
 /// Vector of things sorted by param space. Used to keep
 /// the set of things declared on the type, self, or method
 /// distinct.
-#[deriving(PartialEq, Eq, Clone, Hash, RustcEncodable, RustcDecodable)]
+#[derive(PartialEq, Eq, Clone, Hash, RustcEncodable, RustcDecodable)]
 pub struct VecPerParamSpace<T> {
     // This was originally represented as a tuple with one Vec<T> for
     // each variant of ParamSpace, and that remains the abstraction
@@ -468,7 +468,7 @@ pub fn with_vec(mut self, space: ParamSpace, vec: Vec<T>)
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct EnumeratedItems<'a,T:'a> {
     vec: &'a VecPerParamSpace<T>,
     space_index: uint,
index 8fe851092dceb53a418c38947b7955a06756a786..ce926fd8d10de3b1a6be0e54d0f4b2f611aa0867 100644 (file)
@@ -63,7 +63,7 @@
 /// either identifying an `impl` (e.g., `impl Eq for int`) that
 /// provides the required vtable, or else finding a bound that is in
 /// scope. The eventual result is usually a `Selection` (defined below).
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Obligation<'tcx, T> {
     pub cause: ObligationCause<'tcx>,
     pub recursion_depth: uint,
@@ -74,7 +74,7 @@ pub struct Obligation<'tcx, T> {
 pub type TraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;
 
 /// Why did we incur this obligation? Used for error reporting.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct ObligationCause<'tcx> {
     pub span: Span,
 
@@ -89,7 +89,7 @@ pub struct ObligationCause<'tcx> {
     pub code: ObligationCauseCode<'tcx>
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum ObligationCauseCode<'tcx> {
     /// Not well classified or should be obvious from span.
     MiscObligation,
@@ -126,7 +126,7 @@ pub enum ObligationCauseCode<'tcx> {
     ImplDerivedObligation(DerivedObligationCause<'tcx>),
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct DerivedObligationCause<'tcx> {
     /// The trait reference of the parent obligation that led to the
     /// current obligation. Note that only trait obligations lead to
@@ -144,7 +144,7 @@ pub struct DerivedObligationCause<'tcx> {
 
 pub type Selection<'tcx> = Vtable<'tcx, PredicateObligation<'tcx>>;
 
-#[deriving(Clone,Show)]
+#[derive(Clone,Show)]
 pub enum SelectionError<'tcx> {
     Unimplemented,
     Overflow,
@@ -158,7 +158,7 @@ pub struct FulfillmentError<'tcx> {
     pub code: FulfillmentErrorCode<'tcx>
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum FulfillmentErrorCode<'tcx> {
     CodeSelectionError(SelectionError<'tcx>),
     CodeProjectionError(MismatchedProjectionTypes<'tcx>),
@@ -212,7 +212,7 @@ pub enum FulfillmentErrorCode<'tcx> {
 /// ### The type parameter `N`
 ///
 /// See explanation on `VtableImplData`.
-#[deriving(Show,Clone)]
+#[derive(Show,Clone)]
 pub enum Vtable<'tcx, N> {
     /// Vtable identifying a particular impl.
     VtableImpl(VtableImplData<'tcx, N>),
@@ -247,21 +247,21 @@ pub enum Vtable<'tcx, N> {
 /// is `Obligation`, as one might expect. During trans, however, this
 /// is `()`, because trans only requires a shallow resolution of an
 /// impl, and nested obligations are satisfied later.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct VtableImplData<'tcx, N> {
     pub impl_def_id: ast::DefId,
     pub substs: subst::Substs<'tcx>,
     pub nested: subst::VecPerParamSpace<N>
 }
 
-#[deriving(Show,Clone)]
+#[derive(Show,Clone)]
 pub struct VtableBuiltinData<N> {
     pub nested: subst::VecPerParamSpace<N>
 }
 
 /// A vtable for some object-safe trait `Foo` automatically derived
 /// for the object type `Foo`.
-#[deriving(PartialEq,Eq,Clone)]
+#[derive(PartialEq,Eq,Clone)]
 pub struct VtableObjectData<'tcx> {
     pub object_ty: Ty<'tcx>,
 }
index 53068ea2bece1aa45383d73e305467fd9fbca63e..8880cb7ce733f7ff3124df4c1e5342311ecdb667 100644 (file)
@@ -36,7 +36,7 @@ pub enum ObjectSafetyViolation<'tcx> {
 }
 
 /// Reasons a method might not be object-safe.
-#[deriving(Copy,Clone,Show)]
+#[derive(Copy,Clone,Show)]
 pub enum MethodViolationCode {
     /// e.g., `fn(self)`
     ByValueSelf,
index d053b7fa70cf687b59af9e5d746f5cdb9567ba15..d5b41d238062890f21d32306e03e2036b4868d8d 100644 (file)
@@ -45,7 +45,7 @@ pub enum ProjectionTyError<'tcx> {
     TraitSelectionError(SelectionError<'tcx>),
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct MismatchedProjectionTypes<'tcx> {
     pub err: ty::type_err<'tcx>
 }
index 86365a1ae495378b290950d7e68b94717e60d791..f499cf61301aa9be5d96fc5570e7434aff99b44e 100644 (file)
@@ -83,7 +83,7 @@ struct TraitObligationStack<'prev, 'tcx: 'prev> {
     previous: Option<&'prev TraitObligationStack<'prev, 'tcx>>
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SelectionCache<'tcx> {
     hashmap: RefCell<HashMap<Rc<ty::TraitRef<'tcx>>,
                              SelectionResult<'tcx, SelectionCandidate<'tcx>>>>,
@@ -95,7 +95,7 @@ pub enum MethodMatchResult {
     MethodDidNotMatch,
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum MethodMatchedData {
     // In the case of a precise match, we don't really need to store
     // how the match was found. So don't.
@@ -130,7 +130,7 @@ pub enum MethodMatchedData {
 /// matching where clause. Part of the reason for this is that where
 /// clauses can give additional information (like, the types of output
 /// parameters) that would have to be inferred from the impl.
-#[deriving(PartialEq,Eq,Show,Clone)]
+#[derive(PartialEq,Eq,Show,Clone)]
 enum SelectionCandidate<'tcx> {
     BuiltinCandidate(ty::BuiltinBound),
     ParamCandidate(ty::PolyTraitRef<'tcx>),
@@ -171,7 +171,7 @@ enum BuiltinBoundConditions<'tcx> {
     AmbiguousBuiltin
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 enum EvaluationResult<'tcx> {
     EvaluatedToOk,
     EvaluatedToAmbig,
index a53278305d1b50edee144a83cd0ce54522ea2994..d168e84a01ccdb514bdf310f2f4b06c8c99559fe 100644 (file)
@@ -108,13 +108,13 @@ pub struct CrateAnalysis<'tcx> {
     pub glob_map: Option<GlobMap>,
 }
 
-#[deriving(Copy, PartialEq, Eq, Hash)]
+#[derive(Copy, PartialEq, Eq, Hash)]
 pub struct field<'tcx> {
     pub name: ast::Name,
     pub mt: mt<'tcx>
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub enum ImplOrTraitItemContainer {
     TraitContainer(ast::DefId),
     ImplContainer(ast::DefId),
@@ -129,7 +129,7 @@ pub fn id(&self) -> ast::DefId {
     }
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum ImplOrTraitItem<'tcx> {
     MethodTraitItem(Rc<Method<'tcx>>),
     TypeTraitItem(Rc<AssociatedType>),
@@ -174,7 +174,7 @@ pub fn as_opt_method(&self) -> Option<Rc<Method<'tcx>>> {
     }
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub enum ImplOrTraitItemId {
     MethodTraitItemId(ast::DefId),
     TypeTraitItemId(ast::DefId),
@@ -189,7 +189,7 @@ pub fn def_id(&self) -> ast::DefId {
     }
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct Method<'tcx> {
     pub name: ast::Name,
     pub generics: ty::Generics<'tcx>,
@@ -233,7 +233,7 @@ pub fn container_id(&self) -> ast::DefId {
     }
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub struct AssociatedType {
     pub name: ast::Name,
     pub vis: ast::Visibility,
@@ -241,13 +241,13 @@ pub struct AssociatedType {
     pub container: ImplOrTraitItemContainer,
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub struct mt<'tcx> {
     pub ty: Ty<'tcx>,
     pub mutbl: ast::Mutability,
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show)]
 pub enum TraitStore {
     /// Box<Trait>
     UniqTraitStore,
@@ -255,7 +255,7 @@ pub enum TraitStore {
     RegionTraitStore(Region, ast::Mutability),
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub struct field_ty {
     pub name: Name,
     pub id: DefId,
@@ -265,26 +265,26 @@ pub struct field_ty {
 
 // Contains information needed to resolve types and (in the future) look up
 // the types of AST nodes.
-#[deriving(Copy, PartialEq, Eq, Hash)]
+#[derive(Copy, PartialEq, Eq, Hash)]
 pub struct creader_cache_key {
     pub cnum: CrateNum,
     pub pos: uint,
     pub len: uint
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum ast_ty_to_ty_cache_entry<'tcx> {
     atttce_unresolved,  /* not resolved yet */
     atttce_resolved(Ty<'tcx>)  /* resolved to a type, irrespective of region */
 }
 
-#[deriving(Clone, PartialEq, RustcDecodable, RustcEncodable)]
+#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable)]
 pub struct ItemVariances {
     pub types: VecPerParamSpace<Variance>,
     pub regions: VecPerParamSpace<Variance>,
 }
 
-#[deriving(Clone, PartialEq, RustcDecodable, RustcEncodable, Show, Copy)]
+#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Show, Copy)]
 pub enum Variance {
     Covariant,      // T<A> <: T<B> iff A <: B -- e.g., function return type
     Invariant,      // T<A> <: T<B> iff B == A -- e.g., type of mutable cell
@@ -292,14 +292,14 @@ pub enum Variance {
     Bivariant,      // T<A> <: T<B>            -- e.g., unused type parameter
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum AutoAdjustment<'tcx> {
     AdjustAddEnv(ast::DefId, ty::TraitStore),
     AdjustReifyFnPointer(ast::DefId), // go from a fn-item type to a fn-pointer type
     AdjustDerefRef(AutoDerefRef<'tcx>)
 }
 
-#[deriving(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Show)]
 pub enum UnsizeKind<'tcx> {
     // [T, ..n] -> [T], the uint field is n.
     UnsizeLength(uint),
@@ -309,13 +309,13 @@ pub enum UnsizeKind<'tcx> {
     UnsizeVtable(TyTrait<'tcx>, /* the self type of the trait */ Ty<'tcx>)
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct AutoDerefRef<'tcx> {
     pub autoderefs: uint,
     pub autoref: Option<AutoRef<'tcx>>
 }
 
-#[deriving(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Show)]
 pub enum AutoRef<'tcx> {
     /// Convert from T to &T
     /// The third field allows us to wrap other AutoRef adjustments.
@@ -432,13 +432,13 @@ fn type_of_autoref<'tcx>(cx: &ctxt<'tcx>, autoref: &AutoRef<'tcx>) -> Option<Ty<
     }
 }
 
-#[deriving(Clone, Copy, RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Show)]
+#[derive(Clone, Copy, RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Show)]
 pub struct param_index {
     pub space: subst::ParamSpace,
     pub index: uint
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum MethodOrigin<'tcx> {
     // fully statically resolved method
     MethodStatic(ast::DefId),
@@ -456,7 +456,7 @@ pub enum MethodOrigin<'tcx> {
 
 // details for a method invoked with a receiver whose type is a type parameter
 // with a bounded trait.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct MethodParam<'tcx> {
     // the precise trait reference that occurs as a bound -- this may
     // be a supertrait of what the user actually typed. Note that it
@@ -469,7 +469,7 @@ pub struct MethodParam<'tcx> {
 }
 
 // details for a method invoked with a receiver whose type is an object
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct MethodObject<'tcx> {
     // the (super)trait containing the method to be invoked
     pub trait_ref: Rc<ty::TraitRef<'tcx>>,
@@ -487,7 +487,7 @@ pub struct MethodObject<'tcx> {
     pub real_index: uint,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct MethodCallee<'tcx> {
     pub origin: MethodOrigin<'tcx>,
     pub ty: Ty<'tcx>,
@@ -506,13 +506,13 @@ pub struct MethodCallee<'tcx> {
 /// needed to add to the side tables. Thus to disambiguate
 /// we also keep track of whether there's an adjustment in
 /// our key.
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub struct MethodCall {
     pub expr_id: ast::NodeId,
     pub adjustment: ExprAdjustment
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
 pub enum ExprAdjustment {
     NoAdjustment,
     AutoDeref(uint),
@@ -551,7 +551,7 @@ pub fn autoderef(expr_id: ast::NodeId, autoderef: uint) -> MethodCall {
 // Resolutions for bounds of all parameters, left to right, for a given path.
 pub type vtable_res<'tcx> = VecPerParamSpace<vtable_param_res<'tcx>>;
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum vtable_origin<'tcx> {
     /*
       Statically known vtable. def_id gives the impl item
@@ -596,7 +596,7 @@ fn foo<T:quux,baz,bar>(a: T) -- a's vtable would have a
 /// will push one or more such restriction into the
 /// `transmute_restrictions` vector during `intrinsicck`. They are
 /// then checked during `trans` by the fn `check_intrinsics`.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct TransmuteRestriction<'tcx> {
     /// The span whence the restriction comes.
     pub span: Span,
@@ -858,7 +858,7 @@ macro_rules! sty_debug_print {
         // variable names.
         mod inner {
             use middle::ty;
-            #[deriving(Copy)]
+            #[derive(Copy)]
             struct DebugStat {
                 total: uint,
                 region_infer: uint,
@@ -926,7 +926,7 @@ pub fn print_debug_stats(&self) {
     }
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub struct TyS<'tcx> {
     pub sty: sty<'tcx>,
     pub flags: TypeFlags,
@@ -1032,14 +1032,14 @@ pub fn type_escapes_depth(ty: Ty, depth: u32) -> bool {
     ty.region_depth > depth
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct BareFnTy<'tcx> {
     pub unsafety: ast::Unsafety,
     pub abi: abi::Abi,
     pub sig: PolyFnSig<'tcx>,
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct ClosureTy<'tcx> {
     pub unsafety: ast::Unsafety,
     pub onceness: ast::Onceness,
@@ -1049,7 +1049,7 @@ pub struct ClosureTy<'tcx> {
     pub abi: abi::Abi,
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
 pub enum FnOutput<'tcx> {
     FnConverging(Ty<'tcx>),
     FnDiverging
@@ -1070,7 +1070,7 @@ pub fn unwrap(self) -> Ty<'tcx> {
 /// - `inputs` is the list of arguments and their modes.
 /// - `output` is the return type.
 /// - `variadic` indicates whether this is a varidic function. (only true for foreign fns)
-#[deriving(Clone, PartialEq, Eq, Hash)]
+#[derive(Clone, PartialEq, Eq, Hash)]
 pub struct FnSig<'tcx> {
     pub inputs: Vec<Ty<'tcx>>,
     pub output: FnOutput<'tcx>,
@@ -1079,7 +1079,7 @@ pub struct FnSig<'tcx> {
 
 pub type PolyFnSig<'tcx> = Binder<FnSig<'tcx>>;
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub struct ParamTy {
     pub space: subst::ParamSpace,
     pub idx: u32,
@@ -1125,7 +1125,7 @@ pub struct ParamTy {
 /// is the outer fn.
 ///
 /// [dbi]: http://en.wikipedia.org/wiki/De_Bruijn_index
-#[deriving(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
 pub struct DebruijnIndex {
     // We maintain the invariant that this is never 0. So 1 indicates
     // the innermost binder. To ensure this, create with `DebruijnIndex::new`.
@@ -1133,7 +1133,7 @@ pub struct DebruijnIndex {
 }
 
 /// Representation of regions:
-#[deriving(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Show, Copy)]
 pub enum Region {
     // Region bound in a type or fn declaration which will be
     // substituted 'early' -- that is, at the same time when type
@@ -1174,13 +1174,13 @@ pub enum Region {
 /// Upvars do not get their own node-id. Instead, we use the pair of
 /// the original var id (that is, the root variable that is referenced
 /// by the upvar) and the id of the closure expression.
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, Show)]
 pub struct UpvarId {
     pub var_id: ast::NodeId,
     pub closure_expr_id: ast::NodeId,
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Clone, PartialEq, Eq, Hash, Show, RustcEncodable, RustcDecodable, Copy)]
 pub enum BorrowKind {
     /// Data must be immutable and is aliasable.
     ImmBorrow,
@@ -1273,7 +1273,7 @@ pub enum BorrowKind {
 /// - Through mutation, the borrowed upvars can actually escape
 ///   the closure, so sometimes it is necessary for them to be larger
 ///   than the closure lifetime itself.
-#[deriving(PartialEq, Clone, RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(PartialEq, Clone, RustcEncodable, RustcDecodable, Show, Copy)]
 pub struct UpvarBorrow {
     pub kind: BorrowKind,
     pub region: ty::Region,
@@ -1298,7 +1298,7 @@ pub fn escapes_depth(&self, depth: u32) -> bool {
     }
 }
 
-#[deriving(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
+#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
            RustcEncodable, RustcDecodable, Show, Copy)]
 /// A "free" region `fr` can be interpreted as "some region
 /// at least as big as the scope `fr.scope`".
@@ -1307,7 +1307,7 @@ pub struct FreeRegion {
     pub bound_region: BoundRegion
 }
 
-#[deriving(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
+#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
            RustcEncodable, RustcDecodable, Show, Copy)]
 pub enum BoundRegion {
     /// An anonymous region parameter for a given fn (&T)
@@ -1329,7 +1329,7 @@ pub enum BoundRegion {
 
 // NB: If you change this, you'll probably want to change the corresponding
 // AST structure in libsyntax/ast.rs as well.
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub enum sty<'tcx> {
     ty_bool,
     ty_char,
@@ -1377,7 +1377,7 @@ pub enum sty<'tcx> {
             // on non-useful type error messages)
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct TyTrait<'tcx> {
     pub principal: ty::PolyTraitRef<'tcx>,
     pub bounds: ExistentialBounds<'tcx>,
@@ -1449,7 +1449,7 @@ pub fn projection_bounds_with_self_ty(&self,
 /// Note that a `TraitRef` introduces a level of region binding, to
 /// account for higher-ranked trait bounds like `T : for<'a> Foo<&'a
 /// U>` or higher-ranked object types.
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct TraitRef<'tcx> {
     pub def_id: DefId,
     pub substs: &'tcx Substs<'tcx>,
@@ -1487,16 +1487,16 @@ pub fn to_poly_trait_predicate(&self) -> PolyTraitPredicate<'tcx> {
 /// erase, or otherwise "discharge" these bound reons, we change the
 /// type from `Binder<T>` to just `T` (see
 /// e.g. `liberate_late_bound_regions`).
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct Binder<T>(pub T);
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum IntVarValue {
     IntType(ast::IntTy),
     UintType(ast::UintTy),
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub enum terr_vstore_kind {
     terr_vec,
     terr_str,
@@ -1504,14 +1504,14 @@ pub enum terr_vstore_kind {
     terr_trait
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub struct expected_found<T> {
     pub expected: T,
     pub found: T
 }
 
 // Data structures used in type unification
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub enum type_err<'tcx> {
     terr_mismatch,
     terr_unsafety_mismatch(expected_found<ast::Unsafety>),
@@ -1548,7 +1548,7 @@ pub enum type_err<'tcx> {
 
 /// Bounds suitable for a named type parameter like `A` in `fn foo<A>`
 /// as well as the existential type parameter in an object type.
-#[deriving(PartialEq, Eq, Hash, Clone, Show)]
+#[derive(PartialEq, Eq, Hash, Clone, Show)]
 pub struct ParamBounds<'tcx> {
     pub region_bounds: Vec<ty::Region>,
     pub builtin_bounds: BuiltinBounds,
@@ -1561,7 +1561,7 @@ pub struct ParamBounds<'tcx> {
 /// major difference between this case and `ParamBounds` is that
 /// general purpose trait bounds are omitted and there must be
 /// *exactly one* region.
-#[deriving(PartialEq, Eq, Hash, Clone, Show)]
+#[derive(PartialEq, Eq, Hash, Clone, Show)]
 pub struct ExistentialBounds<'tcx> {
     pub region_bound: ty::Region,
     pub builtin_bounds: BuiltinBounds,
@@ -1570,7 +1570,7 @@ pub struct ExistentialBounds<'tcx> {
 
 pub type BuiltinBounds = EnumSet<BuiltinBound>;
 
-#[deriving(Clone, RustcEncodable, PartialEq, Eq, RustcDecodable, Hash,
+#[derive(Clone, RustcEncodable, PartialEq, Eq, RustcDecodable, Hash,
            Show, Copy)]
 #[repr(uint)]
 pub enum BuiltinBound {
@@ -1608,27 +1608,27 @@ fn from_uint(v: uint) -> BuiltinBound {
     }
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
 pub struct TyVid {
     pub index: u32
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
 pub struct IntVid {
     pub index: u32
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
 pub struct FloatVid {
     pub index: u32
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
 pub struct RegionVid {
     pub index: u32
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Hash)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
 pub enum InferTy {
     TyVar(TyVid),
     IntVar(IntVid),
@@ -1645,7 +1645,7 @@ pub enum InferTy {
     FreshIntTy(u32),
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
 pub enum UnconstrainedNumeric {
     UnconstrainedFloat,
     UnconstrainedInt,
@@ -1653,7 +1653,7 @@ pub enum UnconstrainedNumeric {
 }
 
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Eq, Hash, Show, Copy)]
 pub enum InferRegion {
     ReVar(RegionVid),
     ReSkolemized(u32, BoundRegion)
@@ -1728,7 +1728,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct TypeParameterDef<'tcx> {
     pub name: ast::Name,
     pub def_id: ast::DefId,
@@ -1738,7 +1738,7 @@ pub struct TypeParameterDef<'tcx> {
     pub default: Option<Ty<'tcx>>,
 }
 
-#[deriving(RustcEncodable, RustcDecodable, Clone, Show)]
+#[derive(RustcEncodable, RustcDecodable, Clone, Show)]
 pub struct RegionParameterDef {
     pub name: ast::Name,
     pub def_id: ast::DefId,
@@ -1755,7 +1755,7 @@ pub fn to_early_bound_region(&self) -> ty::Region {
 
 /// Information about the formal type/lifetime parameters associated
 /// with an item or method. Analogous to ast::Generics.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct Generics<'tcx> {
     pub types: VecPerParamSpace<TypeParameterDef<'tcx>>,
     pub regions: VecPerParamSpace<RegionParameterDef>,
@@ -1787,7 +1787,7 @@ pub fn to_bounds(&self, tcx: &ty::ctxt<'tcx>, substs: &Substs<'tcx>)
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub enum Predicate<'tcx> {
     /// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be
     /// the `Self` type of the trait reference and `A`, `B`, and `C`
@@ -1808,7 +1808,7 @@ pub enum Predicate<'tcx> {
     Projection(PolyProjectionPredicate<'tcx>),
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct TraitPredicate<'tcx> {
     pub trait_ref: Rc<TraitRef<'tcx>>
 }
@@ -1834,11 +1834,11 @@ pub fn def_id(&self) -> ast::DefId {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct EquatePredicate<'tcx>(pub Ty<'tcx>, pub Ty<'tcx>); // `0 == 1`
 pub type PolyEquatePredicate<'tcx> = ty::Binder<EquatePredicate<'tcx>>;
 
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct OutlivesPredicate<A,B>(pub A, pub B); // `A : B`
 pub type PolyOutlivesPredicate<A,B> = ty::Binder<OutlivesPredicate<A,B>>;
 pub type PolyRegionOutlivesPredicate = PolyOutlivesPredicate<ty::Region, ty::Region>;
@@ -1856,7 +1856,7 @@ pub fn def_id(&self) -> ast::DefId {
 /// equality between arbitrary types. Processing an instance of Form
 /// #2 eventually yields one of these `ProjectionPredicate`
 /// instances to normalize the LHS.
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct ProjectionPredicate<'tcx> {
     pub projection_ty: ProjectionTy<'tcx>,
     pub ty: Ty<'tcx>,
@@ -1872,7 +1872,7 @@ pub fn sort_key(&self) -> (ast::DefId, ast::Name) {
 
 /// Represents the projection of an associated type. In explicit UFCS
 /// form this would be written `<T as Trait<..>>::N`.
-#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, Hash, Show)]
 pub struct ProjectionTy<'tcx> {
     /// The trait reference `T as Trait<..>`.
     pub trait_ref: Rc<ty::TraitRef<'tcx>>,
@@ -2008,7 +2008,7 @@ pub fn to_opt_poly_trait_ref(&self) -> Option<PolyTraitRef<'tcx>> {
 /// `[[], [U:Bar<T>]]`.  Now if there were some particular reference
 /// like `Foo<int,uint>`, then the `GenericBounds` would be `[[],
 /// [uint:Bar<int>]]`.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct GenericBounds<'tcx> {
     pub predicates: VecPerParamSpace<Predicate<'tcx>>,
 }
@@ -2057,7 +2057,7 @@ pub fn input_types(&self) -> &[Ty<'tcx>] {
 /// bound lifetime parameters are replaced with free ones, but in the
 /// future I hope to refine the representation of types so as to make
 /// more distinctions clearer.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct ParameterEnvironment<'a, 'tcx:'a> {
     pub tcx: &'a ctxt<'tcx>,
 
@@ -2205,7 +2205,7 @@ pub fn for_item(cx: &'a ctxt<'tcx>, id: NodeId) -> ParameterEnvironment<'a, 'tcx
 /// stray references in a comment or something). We try to reserve the
 /// "poly" prefix to refer to higher-ranked things, as in
 /// `PolyTraitRef`.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct TypeScheme<'tcx> {
     pub generics: Generics<'tcx>,
     pub ty: Ty<'tcx>
@@ -2234,13 +2234,13 @@ pub struct TraitDef<'tcx> {
 
 /// Records the substitutions used to translate the polytype for an
 /// item into the monotype of an item reference.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct ItemSubsts<'tcx> {
     pub substs: Substs<'tcx>,
 }
 
 /// Records information about each unboxed closure.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct UnboxedClosure<'tcx> {
     /// The type of the unboxed closure.
     pub closure_type: ClosureTy<'tcx>,
@@ -2248,7 +2248,7 @@ pub struct UnboxedClosure<'tcx> {
     pub kind: UnboxedClosureKind,
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Show)]
 pub enum UnboxedClosureKind {
     FnUnboxedClosureKind,
     FnMutUnboxedClosureKind,
@@ -3129,7 +3129,7 @@ pub fn type_is_floating_point(ty: Ty) -> bool {
 /// The reason we compute type contents and not kinds is that it is
 /// easier for me (nmatsakis) to think about what is contained within
 /// a type than to think about what is *not* contained within a type.
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct TypeContents {
     pub bits: u64
 }
@@ -3733,7 +3733,7 @@ fn subtypes_require<'tcx>(cx: &ctxt<'tcx>, seen: &mut Vec<DefId>,
 ///
 /// The ordering of the cases is significant. They are sorted so that cmp::max
 /// will keep the "more erroneous" of two values.
-#[deriving(Copy, PartialOrd, Ord, Eq, PartialEq, Show)]
+#[derive(Copy, PartialOrd, Ord, Eq, PartialEq, Show)]
 pub enum Representability {
     Representable,
     ContainsRecursive,
@@ -4505,7 +4505,7 @@ pub fn expr_is_lval(tcx: &ctxt, e: &ast::Expr) -> bool {
 /// two kinds of rvalues is an artifact of trans which reflects how we will
 /// generate code for that kind of expression.  See trans/expr.rs for more
 /// information.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum ExprKind {
     LvalueExpr,
     RvalueDpsExpr,
@@ -5091,7 +5091,7 @@ pub fn associated_type_parameter_index(cx: &ctxt,
     cx.sess.bug("couldn't find associated type parameter index")
 }
 
-#[deriving(Copy, PartialEq, Eq)]
+#[derive(Copy, PartialEq, Eq)]
 pub struct AssociatedTypeInfo {
     pub def_id: ast::DefId,
     pub index: uint,
@@ -5186,7 +5186,7 @@ pub fn ty_to_def_id(ty: Ty) -> Option<ast::DefId> {
 }
 
 // Enum information
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct VariantInfo<'tcx> {
     pub args: Vec<Ty<'tcx>>,
     pub arg_names: Option<Vec<ast::Ident>>,
@@ -5277,7 +5277,7 @@ pub fn item_path_str(cx: &ctxt, id: ast::DefId) -> String {
     with_path(cx, id, |path| ast_map::path_to_string(path)).to_string()
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum DtorKind {
     NoDtor,
     TraitDtor(DefId, bool)
@@ -5712,7 +5712,7 @@ pub fn tup_fields<'tcx>(v: &[Ty<'tcx>]) -> Vec<field<'tcx>> {
     }).collect()
 }
 
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
 pub struct UnboxedClosureUpvar<'tcx> {
     pub def: def::Def,
     pub span: Span,
@@ -6643,7 +6643,7 @@ fn unboxed_closure_upvars(&self,
 
 
 /// The category of explicit self.
-#[deriving(Clone, Copy, Eq, PartialEq, Show)]
+#[derive(Clone, Copy, Eq, PartialEq, Show)]
 pub enum ExplicitSelfCategory {
     StaticExplicitSelfCategory,
     ByValueExplicitSelfCategory,
@@ -6712,7 +6712,7 @@ fn accum_substs(accumulator: &mut Vec<Region>, substs: &Substs) {
 }
 
 /// A free variable referred to in a function.
-#[deriving(Copy, RustcEncodable, RustcDecodable)]
+#[derive(Copy, RustcEncodable, RustcDecodable)]
 pub struct Freevar {
     /// The variable being accessed free.
     pub def: def::Def,
@@ -6989,7 +6989,7 @@ pub fn make_substs_for_receiver_types<'tcx>(tcx: &ty::ctxt<'tcx>,
     trait_ref.substs.clone().with_method(meth_tps, meth_regions)
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum CopyImplementationError {
     FieldDoesNotImplementCopy(ast::Name),
     VariantDoesNotImplementCopy(ast::Name),
index f299ea939ed2b02061c9b1b62c44e6e69d04c00a..01bd114474c9e4edd64c6d0705aef7078598e216 100644 (file)
@@ -46,7 +46,7 @@ pub struct Config {
     pub uint_type: UintTy,
 }
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum OptLevel {
     No, // -O0
     Less, // -O1
@@ -54,14 +54,14 @@ pub enum OptLevel {
     Aggressive // -O3
 }
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum DebugInfoLevel {
     NoDebugInfo,
     LimitedDebugInfo,
     FullDebugInfo,
 }
 
-#[deriving(Clone, Copy, PartialEq, PartialOrd, Ord, Eq)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Ord, Eq)]
 pub enum OutputType {
     OutputTypeBitcode,
     OutputTypeAssembly,
@@ -71,7 +71,7 @@ pub enum OutputType {
     OutputTypeDepInfo,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Options {
     // The crate config requested for the session, which may be combined
     // with additional crate configurations during the compile process
@@ -113,7 +113,7 @@ pub struct Options {
     pub alt_std_name: Option<String>
 }
 
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 #[allow(missing_copy_implementations)]
 pub enum PrintRequest {
     FileNames,
@@ -137,7 +137,7 @@ pub fn filestem(&self) -> String {
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct OutputFilenames {
     pub out_directory: Path,
     pub out_filestem: String,
@@ -222,14 +222,14 @@ pub fn basic_options() -> Options {
 // users can have their own entry
 // functions that don't start a
 // scheduler
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum EntryFnType {
     EntryMain,
     EntryStart,
     EntryNone,
 }
 
-#[deriving(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash)]
+#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash)]
 pub enum CrateType {
     CrateTypeExecutable,
     CrateTypeDylib,
@@ -337,7 +337,7 @@ pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
     ]
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum Passes {
     SomePasses(Vec<String>),
     AllPasses,
@@ -365,7 +365,7 @@ pub fn is_empty(&self) -> bool {
 macro_rules! cgoptions {
     ($($opt:ident : $t:ty = ($init:expr, $parse:ident, $desc:expr)),* ,) =>
 (
-    #[deriving(Clone)]
+    #[derive(Clone)]
     pub struct CodegenOptions { $(pub $opt: $t),* }
 
     pub fn basic_codegen_options() -> CodegenOptions {
@@ -674,10 +674,10 @@ pub fn optgroups() -> Vec<getopts::OptGroup> {
         .collect()
 }
 
-#[deriving(Copy, Clone, PartialEq, Eq, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, Show)]
 pub enum OptionStability { Stable, Unstable }
 
-#[deriving(Clone, PartialEq, Eq)]
+#[derive(Clone, PartialEq, Eq)]
 pub struct RustcOptGroup {
     pub opt_group: getopts::OptGroup,
     pub stability: OptionStability,
index 14ea2d3d33a267fba12fc72cad6b67a40226e9c2..9bff54352179ec0c0d4785539a63b68825bbe986 100644 (file)
@@ -10,7 +10,7 @@
 
 use std::slice;
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SearchPaths {
     paths: Vec<(PathKind, Path)>,
 }
@@ -20,7 +20,7 @@ pub struct Iter<'a> {
     iter: slice::Iter<'a, (PathKind, Path)>,
 }
 
-#[deriving(Eq, PartialEq, Clone, Copy)]
+#[derive(Eq, PartialEq, Clone, Copy)]
 pub enum PathKind {
     Native,
     Crate,
index e1448364a9e05a7c36028d5dbe0bfdbdaa8ea646..7d2a8509cb5106e1ad14dcc7ae41cb21c97e0ad5 100644 (file)
@@ -23,7 +23,7 @@
 
 // Useful type to use with `Result<>` indicate that an error has already
 // been reported to the user, so no need to continue checking.
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub struct ErrorReported;
 
 pub fn time<T, U, F>(do_it: bool, what: &str, u: U, f: F) -> T where
index 2b05961bb6a05c0951ecffd48180465914335b11..0da01cd358953581a9d9172fd09ff35104cc64fe 100644 (file)
@@ -68,7 +68,7 @@ pub fn new() -> super::DefIdSet {
 ///
 /// This uses FNV hashing, as described here:
 /// http://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
-#[deriving(Clone, Copy, Default)]
+#[derive(Clone, Copy, Default)]
 pub struct FnvHasher;
 
 #[allow(missing_copy_implementations)]
index 749c39d7a6b92219591dac776430ff97d6686bb9..11820c908eebabdfafeec559da595af8ba46ecf2 100644 (file)
@@ -22,7 +22,7 @@
 
 use std::mem;
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub enum UndoLog<T,U> {
     /// Indicates where a snapshot started.
     OpenSnapshot,
index 2374e8b340be770f28baffa6f184399448eaac70..2ae88aa4476f7e24f8db8ddb0cf294fc9554ed4f 100644 (file)
@@ -53,7 +53,7 @@
 use syntax::ast;
 use syntax::visit;
 
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub struct Svh {
     hash: String,
 }
@@ -172,7 +172,7 @@ pub fn make<'a>(st: &'a mut SipState) -> StrictVersionHashVisitor<'a> {
     // This enum represents the different potential bits of code the
     // visitor could encounter that could affect the ABI for the crate,
     // and assigns each a distinct tag to feed into the hash computation.
-    #[deriving(Hash)]
+    #[derive(Hash)]
     enum SawAbiComponent<'a> {
 
         // FIXME (#14132): should we include (some function of)
@@ -220,7 +220,7 @@ enum SawAbiComponent<'a> {
     /// because the SVH is just a developer convenience; there is no
     /// guarantee of collision-freedom, hash collisions are just
     /// (hopefully) unlikely.)
-    #[deriving(Hash)]
+    #[derive(Hash)]
     pub enum SawExprComponent<'a> {
 
         SawExprLoop(Option<token::InternedString>),
@@ -299,7 +299,7 @@ fn saw_expr<'a>(node: &'a Expr_) -> SawExprComponent<'a> {
     }
 
     /// SawStmtComponent is analogous to SawExprComponent, but for statements.
-    #[deriving(Hash)]
+    #[derive(Hash)]
     pub enum SawStmtComponent {
         SawStmtDecl,
         SawStmtExpr,
index b7b74fe2314f2edc3c29569794681b728d65e89d..d53f97c3a04233c3949561d88ca38784f7645dae 100644 (file)
@@ -77,7 +77,7 @@
 /// Everything `rustc` knows about how to compile for a specific target.
 ///
 /// Every field here must be specified, and has no default value.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct Target {
     /// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM.
     pub data_layout: String,
@@ -100,7 +100,7 @@ pub struct Target {
 ///
 /// This has an implementation of `Default`, see each field for what the default is. In general,
 /// these try to take "minimal defaults" that don't assume anything about the runtime they run in.
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub struct TargetOptions {
     /// Linker to invoke. Defaults to "cc".
     pub linker: String,
index 17a3f4a88e5c080801f7ee23def2f2d4186eb5c3..cb77519671cf57fd315243a576777e5e47da752f 100644 (file)
@@ -213,7 +213,7 @@ pub fn check_loans<'a, 'b, 'c, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
     }
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum UseError<'tcx> {
     UseOk,
     UseWhileBorrowed(/*loan*/Rc<LoanPath<'tcx>>, /*loan*/Span)
index 90da8906a6fa08e19be3a7da742d7aaeb8c21da1..0d86811af9f49cfc6e471b694dd766c005adbd1c 100644 (file)
@@ -30,7 +30,7 @@
 use syntax::attr::AttrMetaMethods;
 use syntax::codemap::Span;
 
-#[deriving(PartialEq, Eq, PartialOrd, Ord)]
+#[derive(PartialEq, Eq, PartialOrd, Ord)]
 enum Fragment {
     // This represents the path described by the move path index
     Just(MovePathIndex),
index 8d3aa397f306163063c5aeee492f0f05b2297eba..95c5d9415a1250f8a194ade562d0ac85e9928109 100644 (file)
@@ -53,7 +53,7 @@ pub fn with_move_info(move_from: mc::cmt<'tcx>,
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct MoveSpanAndPath {
     pub span: codemap::Span,
     pub ident: ast::Ident
index ad31c52ca34f0eb150e0fdf259c06657b4674224..c55444c84aadd02d59dd84a92b17cbe50b8b1488 100644 (file)
@@ -21,7 +21,7 @@
 
 use std::rc::Rc;
 
-#[deriving(Show)]
+#[derive(Show)]
 pub enum RestrictionResult<'tcx> {
     Safe,
     SafeIf(Rc<LoanPath<'tcx>>, Vec<Rc<LoanPath<'tcx>>>)
index 430e85d0b6c84ba6399b0fa455ea3e2e87d4067d..75545634b40cf689a72597e9d339ba37e6bdadf0 100644 (file)
@@ -56,7 +56,7 @@ macro_rules! if_ok {
 
 pub mod move_data;
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct LoanDataFlowOperator;
 
 pub type LoanDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, LoanDataFlowOperator>;
@@ -287,7 +287,7 @@ pub fn loan_path(&self) -> Rc<LoanPath<'tcx>> {
     }
 }
 
-#[deriving(Eq, Hash, Show)]
+#[derive(Eq, Hash, Show)]
 pub struct LoanPath<'tcx> {
     kind: LoanPathKind<'tcx>,
     ty: ty::Ty<'tcx>,
@@ -302,7 +302,7 @@ fn eq(&self, that: &LoanPath<'tcx>) -> bool {
     }
 }
 
-#[deriving(PartialEq, Eq, Hash, Show)]
+#[derive(PartialEq, Eq, Hash, Show)]
 pub enum LoanPathKind<'tcx> {
     LpVar(ast::NodeId),                         // `x` in doc.rs
     LpUpvar(ty::UpvarId),                       // `x` captured by-value into closure
@@ -323,7 +323,7 @@ fn to_type(&self) -> ty::Ty<'tcx> { self.ty }
 //     b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003
 static DOWNCAST_PRINTED_OPERATOR : &'static str = " as ";
 
-#[deriving(Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Hash, Show)]
 pub enum LoanPathElem {
     LpDeref(mc::PointerKind),    // `*LV` in doc.rs
     LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
@@ -472,7 +472,7 @@ pub fn opt_loan_path<'tcx>(cmt: &mc::cmt<'tcx>) -> Option<Rc<LoanPath<'tcx>>> {
 // Errors
 
 // Errors that can occur
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 #[allow(missing_copy_implementations)]
 pub enum bckerr_code {
     err_mutbl,
@@ -482,7 +482,7 @@ pub enum bckerr_code {
 
 // Combination of an error code and the categorization of the expression
 // that caused it
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub struct BckError<'tcx> {
     span: Span,
     cause: euv::LoanCause,
@@ -490,13 +490,13 @@ pub struct BckError<'tcx> {
     code: bckerr_code
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AliasableViolationKind {
     MutabilityViolation,
     BorrowViolation(euv::LoanCause)
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum MovedValueUseKind {
     MovedInUse,
     MovedInCapture,
index 547e7d272c69d9026430952264f8ce682f001c0e..b49164f0c25476aa46c9333841e775ff2117a059 100644 (file)
@@ -76,7 +76,7 @@ pub struct FlowedMoveData<'a, 'tcx: 'a> {
 }
 
 /// Index into `MoveData.paths`, used like a pointer
-#[deriving(Copy, PartialEq, Eq, PartialOrd, Ord, Show)]
+#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Show)]
 pub struct MovePathIndex(uint);
 
 impl MovePathIndex {
@@ -96,7 +96,7 @@ fn clone(&self) -> MovePathIndex {
     MovePathIndex(uint::MAX);
 
 /// Index into `MoveData.moves`, used like a pointer
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub struct MoveIndex(uint);
 
 impl MoveIndex {
@@ -128,7 +128,7 @@ pub struct MovePath<'tcx> {
     pub next_sibling: MovePathIndex,
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum MoveKind {
     Declared,   // When declared, variables start out "moved".
     MoveExpr,   // Expression or binding that moves a variable
@@ -136,7 +136,7 @@ pub enum MoveKind {
     Captured    // Closure creation that moves a value
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Move {
     /// Path being moved.
     pub path: MovePathIndex,
@@ -151,7 +151,7 @@ pub struct Move {
     pub next_move: MoveIndex
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Assignment {
     /// Path being assigned.
     pub path: MovePathIndex,
@@ -163,7 +163,7 @@ pub struct Assignment {
     pub span: Span,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct VariantMatch {
     /// downcast to the variant.
     pub path: MovePathIndex,
@@ -178,12 +178,12 @@ pub struct VariantMatch {
     pub mode: euv::MatchMode
 }
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct MoveDataFlowOperator;
 
 pub type MoveDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, MoveDataFlowOperator>;
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct AssignDataFlowOperator;
 
 pub type AssignDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, AssignDataFlowOperator>;
index ac6b962d6470448e43958c0eb41109df4d5732c3..388cbf2f18b7ca142f01cb482cd8d80ae28827d5 100644 (file)
@@ -26,7 +26,7 @@
 use std::rc::Rc;
 use std::borrow::IntoCow;
 
-#[deriving(Show, Copy)]
+#[derive(Show, Copy)]
 pub enum Variant {
     Loans,
     Moves,
index b2f4070d2007ed637544094f37bdfa0e34b58492..d972229e7c75b25f08e3cbf9aadd73b66357f64c 100644 (file)
@@ -41,7 +41,7 @@
 use std::option;
 use std::str::FromStr;
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum PpSourceMode {
     PpmNormal,
     PpmEveryBodyLoops,
@@ -52,7 +52,7 @@ pub enum PpSourceMode {
     PpmExpandedHygiene,
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum PpMode {
     PpmSource(PpSourceMode),
     PpmFlowGraph,
@@ -323,7 +323,7 @@ fn gather_flowgraph_variants(sess: &Session) -> Vec<borrowck_dot::Variant> {
     variants
 }
 
-#[deriving(Clone, Show)]
+#[derive(Clone, Show)]
 pub enum UserIdentifiedItem {
     ItemViaNode(ast::NodeId),
     ItemViaPath(Vec<String>),
index 3bf9c2d44f72184a78eef8c528c643768561ae3d..464f9f98e7ffccae02061d41c445edf02cdac77c 100644 (file)
@@ -17,7 +17,7 @@
 
 use {ValueRef, TwineRef, DebugLocRef, DiagnosticInfoRef};
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum OptimizationDiagnosticKind {
     OptimizationRemark,
     OptimizationMissed,
@@ -68,7 +68,7 @@ unsafe fn unpack(kind: OptimizationDiagnosticKind, di: DiagnosticInfoRef)
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Diagnostic {
     Optimization(OptimizationDiagnostic),
 
index e16c27a145093ea7478419efe3253ce68ef4a43a..2ec5f37634afb35474c708bae64d1e8e9538d023 100644 (file)
@@ -68,7 +68,7 @@
 
 // Consts for the LLVM CallConv type, pre-cast to uint.
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum CallConv {
     CCallConv = 0,
     FastCallConv = 8,
@@ -78,7 +78,7 @@ pub enum CallConv {
     X86_64_Win64 = 79,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Visibility {
     LLVMDefaultVisibility = 0,
     HiddenVisibility = 1,
@@ -89,7 +89,7 @@ pub enum Visibility {
 // DLLExportLinkage, GhostLinkage and LinkOnceODRAutoHideLinkage.
 // LinkerPrivateLinkage and LinkerPrivateWeakLinkage are not included either;
 // they've been removed in upstream LLVM commit r203866.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Linkage {
     ExternalLinkage = 0,
     AvailableExternallyLinkage = 1,
@@ -105,7 +105,7 @@ pub enum Linkage {
 }
 
 #[repr(C)]
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum DiagnosticSeverity {
     Error,
     Warning,
@@ -146,7 +146,7 @@ pub enum DiagnosticSeverity {
 
 
 #[repr(u64)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum OtherAttribute {
     // The following are not really exposed in
     // the LLVM c api so instead to add these
@@ -167,13 +167,13 @@ pub enum OtherAttribute {
     NonNullAttribute = 1 << 44,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum SpecialAttribute {
     DereferenceableAttribute(u64)
 }
 
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AttributeSet {
     ReturnIndex = 0,
     FunctionIndex = !0
@@ -265,7 +265,7 @@ pub fn apply_callsite(&self, callsite: ValueRef) {
 }
 
 // enum for the LLVM IntPredicate type
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum IntPredicate {
     IntEQ = 32,
     IntNE = 33,
@@ -280,7 +280,7 @@ pub enum IntPredicate {
 }
 
 // enum for the LLVM RealPredicate type
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum RealPredicate {
     RealPredicateFalse = 0,
     RealOEQ = 1,
@@ -302,7 +302,7 @@ pub enum RealPredicate {
 
 // The LLVM TypeKind type - must stay in sync with the def of
 // LLVMTypeKind in llvm/include/llvm-c/Core.h
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 #[repr(C)]
 pub enum TypeKind {
     Void      = 0,
@@ -324,7 +324,7 @@ pub enum TypeKind {
 }
 
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AtomicBinOp {
     AtomicXchg = 0,
     AtomicAdd  = 1,
@@ -340,7 +340,7 @@ pub enum AtomicBinOp {
 }
 
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AtomicOrdering {
     NotAtomic = 0,
     Unordered = 1,
@@ -354,13 +354,13 @@ pub enum AtomicOrdering {
 
 // Consts for the LLVMCodeGenFileType type (in include/llvm/c/TargetMachine.h)
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum FileType {
     AssemblyFileType = 0,
     ObjectFileType = 1
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum MetadataType {
     MD_dbg = 0,
     MD_tbaa = 1,
@@ -371,13 +371,13 @@ pub enum MetadataType {
 }
 
 // Inline Asm Dialect
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AsmDialect {
     AD_ATT   = 0,
     AD_Intel = 1
 }
 
-#[deriving(Copy, PartialEq, Clone)]
+#[derive(Copy, PartialEq, Clone)]
 #[repr(C)]
 pub enum CodeGenOptLevel {
     CodeGenLevelNone = 0,
@@ -386,7 +386,7 @@ pub enum CodeGenOptLevel {
     CodeGenLevelAggressive = 3,
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 #[repr(C)]
 pub enum RelocMode {
     RelocDefault = 0,
@@ -396,7 +396,7 @@ pub enum RelocMode {
 }
 
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum CodeGenModel {
     CodeModelDefault = 0,
     CodeModelJITDefault = 1,
@@ -407,7 +407,7 @@ pub enum CodeGenModel {
 }
 
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum DiagnosticKind {
     DK_InlineAsm = 0,
     DK_StackSize,
@@ -513,7 +513,7 @@ pub enum DIBuilder_opaque {}
     pub type DIArray = DIDescriptor;
     pub type DISubrange = DIDescriptor;
 
-    #[deriving(Copy)]
+    #[derive(Copy)]
     pub enum DIDescriptorFlags {
       FlagPrivate            = 1 << 0,
       FlagProtected          = 1 << 1,
index 2fc039764ae63b391a0c9e8143e45bf91f3237bd..d7c1a4fe17b2fa200509dad0332536fcde2eb1fd 100644 (file)
@@ -67,7 +67,7 @@
 
 // Specifies how duplicates should be handled when adding a child item if
 // another item exists with the same name in some namespace.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum DuplicateCheckingMode {
     ForbidDuplicateModules,
     ForbidDuplicateTypesAndModules,
@@ -76,7 +76,7 @@ enum DuplicateCheckingMode {
     OverwriteDuplicates
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum NamespaceError {
     NoError,
     ModuleError,
index f28e012b7369bbb5ba2c2d227763386e8bc1b42f..3be7aa294f17a759ae795ec02a5d0e630747382c 100644 (file)
@@ -98,7 +98,7 @@
 mod record_exports;
 mod build_reduced_graph;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 struct BindingInfo {
     span: Span,
     binding_mode: BindingMode,
@@ -107,14 +107,14 @@ struct BindingInfo {
 // Map from the name in a pattern to its binding mode.
 type BindingMap = HashMap<Name, BindingInfo>;
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum PatternBindingMode {
     RefutableMode,
     LocalIrrefutableMode,
     ArgumentIrrefutableMode,
 }
 
-#[deriving(Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Hash, Show)]
 enum Namespace {
     TypeNS,
     ValueNS
@@ -123,7 +123,7 @@ enum Namespace {
 /// A NamespaceResult represents the result of resolving an import in
 /// a particular namespace. The result is either definitely-resolved,
 /// definitely- unresolved, or unknown.
-#[deriving(Clone)]
+#[derive(Clone)]
 enum NamespaceResult {
     /// Means that resolve hasn't gathered enough information yet to determine
     /// whether the name is bound in this namespace. (That is, it hasn't
@@ -180,7 +180,7 @@ fn visit_ty(&mut self, ty: &Ty) {
 }
 
 /// Contains data for specific types of import directives.
-#[deriving(Copy,Show)]
+#[derive(Copy,Show)]
 enum ImportDirectiveSubclass {
     SingleImport(Name /* target */, Name /* source */),
     GlobImport
@@ -209,7 +209,7 @@ enum FallbackSuggestion {
     TraitMethod(String),
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum TypeParameters<'a> {
     NoTypeParameters,
     HasTypeParameters(
@@ -229,7 +229,7 @@ enum TypeParameters<'a> {
 
 // The rib kind controls the translation of local
 // definitions (`DefLocal`) to upvars (`DefUpvar`).
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 enum RibKind {
     // No translation needs to be applied.
     NormalRibKind,
@@ -253,13 +253,13 @@ enum RibKind {
 }
 
 // Methods can be required or provided. RequiredMethod methods only occur in traits.
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 enum MethodSort {
     RequiredMethod,
     ProvidedMethod(NodeId)
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum UseLexicalScopeFlag {
     DontUseLexicalScope,
     UseLexicalScope
@@ -270,7 +270,7 @@ enum ModulePrefixResult {
     PrefixFound(Rc<Module>, uint)
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum NameSearchType {
     /// We're doing a name search in order to resolve a `use` directive.
     ImportSearch,
@@ -280,7 +280,7 @@ enum NameSearchType {
     PathSearch,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum BareIdentifierPatternResolution {
     FoundStructOrEnumVariant(Def, LastPrivate),
     FoundConst(Def, LastPrivate),
@@ -288,7 +288,7 @@ enum BareIdentifierPatternResolution {
 }
 
 /// One local scope.
-#[deriving(Show)]
+#[derive(Show)]
 struct Rib {
     bindings: HashMap<Name, DefLike>,
     kind: RibKind,
@@ -304,14 +304,14 @@ fn new(kind: RibKind) -> Rib {
 }
 
 /// Whether an import can be shadowed by another import.
-#[deriving(Show,PartialEq,Clone,Copy)]
+#[derive(Show,PartialEq,Clone,Copy)]
 enum Shadowable {
     Always,
     Never
 }
 
 /// One import directive.
-#[deriving(Show)]
+#[derive(Show)]
 struct ImportDirective {
     module_path: Vec<Name>,
     subclass: ImportDirectiveSubclass,
@@ -341,7 +341,7 @@ fn new(module_path: Vec<Name> ,
 }
 
 /// The item that an import resolves to.
-#[deriving(Clone,Show)]
+#[derive(Clone,Show)]
 struct Target {
     target_module: Rc<Module>,
     bindings: Rc<NameBindings>,
@@ -362,7 +362,7 @@ fn new(target_module: Rc<Module>,
 }
 
 /// An ImportResolution represents a particular `use` directive.
-#[deriving(Show)]
+#[derive(Show)]
 struct ImportResolution {
     /// Whether this resolution came from a `use` or a `pub use`. Note that this
     /// should *not* be used whenever resolution is being performed, this is
@@ -442,7 +442,7 @@ fn set_target_and_id(&mut self,
 }
 
 /// The link from a module up to its nearest parent node.
-#[deriving(Clone,Show)]
+#[derive(Clone,Show)]
 enum ParentLink {
     NoParentLink,
     ModuleParentLink(Weak<Module>, Name),
@@ -450,7 +450,7 @@ enum ParentLink {
 }
 
 /// The type of module this is.
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 enum ModuleKind {
     NormalModuleKind,
     TraitModuleKind,
@@ -542,7 +542,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 bitflags! {
-    #[deriving(Show)]
+    #[derive(Show)]
     flags DefModifiers: u8 {
         const PUBLIC            = 0b0000_0001,
         const IMPORTABLE        = 0b0000_0010,
@@ -550,7 +550,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 // Records a possibly-private type definition.
-#[deriving(Clone,Show)]
+#[derive(Clone,Show)]
 struct TypeNsDef {
     modifiers: DefModifiers, // see note in ImportResolution about how to use this
     module_def: Option<Rc<Module>>,
@@ -559,7 +559,7 @@ struct TypeNsDef {
 }
 
 // Records a possibly-private value definition.
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 struct ValueNsDef {
     modifiers: DefModifiers, // see note in ImportResolution about how to use this
     def: Def,
@@ -568,14 +568,14 @@ struct ValueNsDef {
 
 // Records the definitions (at most one for each namespace) that a name is
 // bound to.
-#[deriving(Show)]
+#[derive(Show)]
 struct NameBindings {
     type_def: RefCell<Option<TypeNsDef>>,   //< Meaning in type namespace.
     value_def: RefCell<Option<ValueNsDef>>, //< Meaning in value namespace.
 }
 
 /// Ways in which a trait can be referenced
-#[deriving(Copy)]
+#[derive(Copy)]
 enum TraitReferenceType {
     TraitImplementation,             // impl SomeTrait for T { ... }
     TraitDerivation,                 // trait T : SomeTrait { ... }
@@ -904,7 +904,7 @@ struct Resolver<'a, 'tcx:'a> {
     used_crates: HashSet<CrateNum>,
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum FallbackChecks {
     Everything,
     OnlyTraitAndStatics
@@ -4834,7 +4834,7 @@ pub struct CrateMap {
     pub glob_map: Option<GlobMap>
 }
 
-#[deriving(PartialEq,Copy)]
+#[derive(PartialEq,Copy)]
 pub enum MakeGlobMap {
     Yes,
     No
index c1e470aa4e8b7fc99bd47a84604f57dcf90082ff..33011d9e35c106b959033561f4c63b88e7fed919 100644 (file)
@@ -34,7 +34,7 @@
 use std::thread;
 use libc::{c_uint, c_int, c_void};
 
-#[deriving(Clone, Copy, PartialEq, PartialOrd, Ord, Eq)]
+#[derive(Clone, Copy, PartialEq, PartialOrd, Ord, Eq)]
 pub enum OutputType {
     OutputTypeBitcode,
     OutputTypeAssembly,
@@ -86,7 +86,7 @@ struct Diagnostic {
 // We use an Arc instead of just returning a list of diagnostics from the
 // child task because we need to make sure that the messages are seen even
 // if the child task panics (for example, when `fatal` is called).
-#[deriving(Clone)]
+#[derive(Clone)]
 struct SharedEmitter {
     buffer: Arc<Mutex<Vec<Diagnostic>>>,
 }
@@ -256,7 +256,7 @@ fn create_target_machine(sess: &Session) -> TargetMachineRef {
 
 
 /// Module-specific configuration for `optimize_and_codegen`.
-#[deriving(Clone)]
+#[derive(Clone)]
 struct ModuleConfig {
     /// LLVM TargetMachine to use for codegen.
     tm: TargetMachineRef,
index f62073e54e6d963e4345d811c0d4c1dc060e4191..679a8d2d07bc88acf3533b5b30cd03646936b9a1 100644 (file)
@@ -61,7 +61,7 @@ macro_rules! svec {
     })
 }
 
-#[deriving(Copy,Show)]
+#[derive(Copy,Show)]
 pub enum Row {
     Variable,
     Enum,
index 244d0476832bdb7545699a8cc436dd1ca03cdb64..14c6475c87df9199c9425c1a8a33353da8dcfba5 100644 (file)
@@ -21,7 +21,7 @@
 use syntax::parse::token;
 use syntax::parse::token::{keywords, Token};
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SpanUtils<'a> {
     pub sess: &'a Session,
     pub err_count: Cell<int>,
index 6fe530d6e1d8c1b5d80db722686c22b8ef67c011..50cbe664b90798d07853a7b8a7647e02fcaca572 100644 (file)
 use syntax::fold::Folder;
 use syntax::ptr::P;
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 struct ConstantExpr<'a>(&'a ast::Expr);
 
 impl<'a> ConstantExpr<'a> {
@@ -242,7 +242,7 @@ fn eq(self, other: ConstantExpr<'a>, tcx: &ty::ctxt) -> bool {
 }
 
 // An option identifying a branch (either a literal, an enum variant or a range)
-#[deriving(Show)]
+#[derive(Show)]
 enum Opt<'a, 'tcx> {
     ConstantValue(ConstantExpr<'a>),
     ConstantRange(ConstantExpr<'a>, ConstantExpr<'a>),
@@ -298,7 +298,7 @@ fn trans<'blk>(&self, mut bcx: Block<'blk, 'tcx>) -> OptResult<'blk, 'tcx> {
     }
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum BranchKind {
     NoBranch,
     Single,
@@ -313,7 +313,7 @@ pub enum OptResult<'blk, 'tcx: 'blk> {
     LowerBound(Result<'blk, 'tcx>)
 }
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub enum TransBindingMode {
     TrByCopy(/* llbinding */ ValueRef),
     TrByMove,
@@ -327,7 +327,7 @@ pub enum TransBindingMode {
 /// - `trmode` is the trans binding mode
 /// - `id` is the node id of the binding
 /// - `ty` is the Rust type of the binding
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct BindingInfo<'tcx> {
     pub llmatch: ValueRef,
     pub trmode: TransBindingMode,
index 881068325da87f25b422781a90d1d03991dca8c3..223df5d3a57855dc6e366e875515e4b442b452a7 100644 (file)
@@ -71,7 +71,7 @@
 type Hint = attr::ReprAttr;
 
 /// Representations.
-#[deriving(Eq, PartialEq, Show)]
+#[derive(Eq, PartialEq, Show)]
 pub enum Repr<'tcx> {
     /// C-like enums; basically an int.
     CEnum(IntType, Disr, Disr), // discriminant range (signedness based on the IntType)
@@ -116,7 +116,7 @@ pub enum Repr<'tcx> {
 }
 
 /// For structs, and struct-like parts of anything fancier.
-#[deriving(Eq, PartialEq, Show)]
+#[derive(Eq, PartialEq, Show)]
 pub struct Struct<'tcx> {
     // If the struct is DST, then the size and alignment do not take into
     // account the unsized fields of the struct.
@@ -469,7 +469,7 @@ fn mk_struct<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
     }
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 struct IntBounds {
     slo: i64,
     shi: i64,
index bf37f399fa8b97be1c7999ff4c6447df936cedff..58cb2ebd2566c6990e92f66456cea71e30575d2d 100644 (file)
@@ -547,7 +547,7 @@ pub fn maybe_name_value(cx: &CrateContext, v: ValueRef, s: &str) {
 
 
 // Used only for creating scalar comparison glue.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum scalar_type { nil_type, signed_int, unsigned_int, floating_point, }
 
 pub fn compare_scalar_types<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
@@ -1784,7 +1784,7 @@ pub fn build_return_block<'blk, 'tcx>(fcx: &FunctionContext<'blk, 'tcx>,
     }
 }
 
-#[deriving(Clone, Copy, Eq, PartialEq)]
+#[derive(Clone, Copy, Eq, PartialEq)]
 pub enum IsUnboxedClosureFlag {
     NotUnboxedClosure,
     IsUnboxedClosure,
@@ -2206,7 +2206,7 @@ pub fn llvm_linkage_by_name(name: &str) -> Option<Linkage> {
 
 
 /// Enum describing the origin of an LLVM `Value`, for linkage purposes.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum ValueOrigin {
     /// The LLVM `Value` is in this context because the corresponding item was
     /// assigned to the current compilation unit.
index ab25343ff5fe0c46e4832c70fe7cf641eb11ba3f..d3ff432b5e41860f78368853928a8428eeb3d412 100644 (file)
@@ -13,7 +13,7 @@
 use trans::value::{Users, Value};
 use std::iter::{Filter, Map};
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct BasicBlock(pub BasicBlockRef);
 
 pub type Preds = Map<
index abe5af44c3f56ec111d228938def3f6c07dc52c8..0e38dd0e5b5967d424a7b7ffc2253835b9db1b73 100644 (file)
@@ -21,7 +21,7 @@
 use trans::cabi_mips;
 use trans::type_::Type;
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum ArgKind {
     /// Pass the argument directly using the normal converted
     /// LLVM type or by coercing to another specified type
@@ -36,7 +36,7 @@ pub enum ArgKind {
 /// should be passed to or returned from a function
 ///
 /// This is borrowed from clang's ABIInfo.h
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct ArgType {
     pub kind: ArgKind,
     /// Original LLVM type
index fffdc9c97ab97e41fa73be0b562b865664efe755..f59d152fa473cf5b88a8a4e1f63626ba341225e8 100644 (file)
@@ -25,7 +25,7 @@
 use std::cmp;
 use std::iter::repeat;
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 enum RegClass {
     NoClass,
     Int,
index c65394c174a4c539d0638405f881d2f829983e7f..f001786bec4e96be9d8a0454d0fd2dbb51047d1e 100644 (file)
@@ -58,7 +58,7 @@
 use syntax::ast_map;
 use syntax::ptr::P;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct MethodData {
     pub llfn: ValueRef,
     pub llself: ValueRef,
@@ -1052,7 +1052,7 @@ pub fn trans_args<'a, 'blk, 'tcx>(cx: Block<'blk, 'tcx>,
     bcx
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AutorefArg {
     DontAutorefArg,
     DoAutorefArg(ast::NodeId)
index f0ed8f4efcb3d1fb601d95239bdebb3449333fb6..59ba56bbbc857cd5871e20ab57e459db285368c9 100644 (file)
@@ -51,7 +51,7 @@ pub struct CleanupScope<'blk, 'tcx: 'blk> {
     cached_landing_pad: Option<BasicBlockRef>,
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub struct CustomScopeIndex {
     index: uint
 }
@@ -82,14 +82,14 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum EarlyExitLabel {
     UnwindExit,
     ReturnExit,
     LoopExit(ast::NodeId, uint)
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct CachedEarlyExit {
     label: EarlyExitLabel,
     cleanup_block: BasicBlockRef,
@@ -107,7 +107,7 @@ fn trans<'blk>(&self,
 
 pub type CleanupObj<'tcx> = Box<Cleanup<'tcx>+'tcx>;
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum ScopeId {
     AstScope(ast::NodeId),
     CustomScope(CustomScopeIndex)
@@ -871,7 +871,7 @@ fn is_unwind(&self) -> bool {
 ///////////////////////////////////////////////////////////////////////////
 // Cleanup types
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct DropValue<'tcx> {
     is_immediate: bool,
     must_unwind: bool,
@@ -909,12 +909,12 @@ fn trans<'blk>(&self,
     }
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum Heap {
     HeapExchange
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct FreeValue<'tcx> {
     ptr: ValueRef,
     heap: Heap,
@@ -948,7 +948,7 @@ fn trans<'blk>(&self,
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct FreeSlice {
     ptr: ValueRef,
     size: ValueRef,
@@ -983,7 +983,7 @@ fn trans<'blk>(&self,
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct LifetimeEnd {
     ptr: ValueRef,
 }
index a6a83447cd68661e849bcb8da1c2e2351cbdd06d..cb5302f7234f91a7932461f41ebd74272fc1dd19 100644 (file)
 //
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct EnvValue<'tcx> {
     action: ast::CaptureClause,
     datum: Datum<'tcx, Lvalue>
@@ -348,7 +348,7 @@ fn fill_fn_pair(bcx: Block, pair: ValueRef, llfn: ValueRef, llenvptr: ValueRef)
     Store(bcx, llenvptr, GEPi(bcx, pair, &[0u, abi::FAT_PTR_EXTRA]));
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub enum ClosureKind<'tcx> {
     NotClosure,
     // See load_environment.
index d0ea0f69c05455a631af160893b2b86d23635177..87a1862186a4d1d7814d0df3840ca46a1cf4cfd6 100644 (file)
@@ -220,7 +220,7 @@ pub fn gensym_name(name: &str) -> PathElem {
     PathName(token::gensym(format!("{}:{}", name, num)[]))
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct tydesc_info<'tcx> {
     pub ty: Ty<'tcx>,
     pub tydesc: ValueRef,
@@ -255,7 +255,7 @@ pub struct tydesc_info<'tcx> {
  *
  */
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NodeInfo {
     pub id: ast::NodeId,
     pub span: Span,
@@ -1086,7 +1086,7 @@ pub fn drain_fulfillment_cx<'a,'tcx,T>(span: Span,
 }
 
 // Key used to lookup values supplied for type parameters in an expr.
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum ExprOrMethodCall {
     // Type parameters for a path like `None::<int>`
     ExprId(ast::NodeId),
index 96013bc7423eb1076615700572652a7448a413e5..d73b3f6b4e420e9ab27b9f153942dafad1129148 100644 (file)
@@ -34,7 +34,7 @@
 /// describes where the value is stored, what Rust type the value has,
 /// whether it is addressed by reference, and so forth. Please refer
 /// the section on datums in `doc.rs` for more details.
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct Datum<'tcx, K> {
     /// The llvm value.  This is either a pointer to the Rust value or
     /// the value itself, depending on `kind` below.
@@ -52,7 +52,7 @@ pub struct DatumBlock<'blk, 'tcx: 'blk, K> {
     pub datum: Datum<'tcx, K>,
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub enum Expr {
     /// a fresh value that was produced and which has no cleanup yet
     /// because it has not yet "landed" into its permanent home
@@ -64,10 +64,10 @@ pub enum Expr {
     LvalueExpr,
 }
 
-#[deriving(Clone, Copy, Show)]
+#[derive(Clone, Copy, Show)]
 pub struct Lvalue;
 
-#[deriving(Show)]
+#[derive(Show)]
 pub struct Rvalue {
     pub mode: RvalueMode
 }
@@ -83,7 +83,7 @@ impl Drop for Rvalue {
     fn drop(&mut self) { }
 }
 
-#[deriving(Copy, PartialEq, Eq, Hash, Show)]
+#[derive(Copy, PartialEq, Eq, Hash, Show)]
 pub enum RvalueMode {
     /// `val` is a pointer to the actual value (and thus has type *T)
     ByRef,
index 74cb6ea099a5d0e8e8d151810ee392babe9bc44f..916fcbfe13ef77df022583d3acf82788b4ee20ee 100644 (file)
 //  Public Interface of debuginfo module
 //=-----------------------------------------------------------------------------
 
-#[deriving(Copy, Show, Hash, Eq, PartialEq, Clone)]
+#[derive(Copy, Show, Hash, Eq, PartialEq, Clone)]
 struct UniqueTypeId(ast::Name);
 
 // The TypeMap is where the CrateDebugContext holds the type metadata nodes
@@ -2380,7 +2380,7 @@ fn create_member_descriptions<'a>(&self, cx: &CrateContext<'a, 'tcx>)
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum EnumDiscriminantInfo {
     RegularDiscriminant(DIType),
     OptimizedDiscriminant,
@@ -3107,7 +3107,7 @@ fn new(metadata: DIType, already_stored_in_typemap: bool) -> MetadataCreationRes
     }
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum DebugLocation {
     KnownLocation { scope: DIScope, line: uint, col: uint },
     UnknownLocation
index f1721f22315e813acdc5f28102bbbae6667130e2..c525e6fcfe36ac0fe39225d89ea9188e906e6c2b 100644 (file)
@@ -75,7 +75,7 @@
 // These are passed around by the code generating functions to track the
 // destination of a computation's value.
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Dest {
     SaveIn(ValueRef),
     Ignore,
@@ -1978,7 +1978,7 @@ fn float_cast(bcx: Block,
     } else { llsrc };
 }
 
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum cast_kind {
     cast_pointer,
     cast_integral,
index 3030714f4e9894b1c93025ba4c42242284398d27..72c4def15a215d69018908b3d5e23f785568b7fb 100644 (file)
@@ -55,7 +55,7 @@
 mod llrepr;
 mod cleanup;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ModuleTranslation {
     pub llcx: ContextRef,
     pub llmod: ModuleRef,
index d172f0a18e84834eda59de3bc6da0272aa58c7dc..51a6bc3bfd5dedd3773c8e6c19c10217bce4812e 100644 (file)
@@ -286,7 +286,7 @@ pub fn monomorphic_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
     (lldecl, true)
 }
 
-#[deriving(PartialEq, Eq, Hash, Show)]
+#[derive(PartialEq, Eq, Hash, Show)]
 pub struct MonoId<'tcx> {
     pub def: ast::DefId,
     pub params: subst::VecPerParamSpace<Ty<'tcx>>
index 0cb4f61a302b97e558f2a43a2f99b3be0df6572a..f8d0d4f5c7bf00903c8f28fe780a3efb0608ab23 100644 (file)
@@ -89,7 +89,7 @@ pub fn make_drop_glue_unboxed<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
     })
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct VecTypes<'tcx> {
     pub unit_ty: Ty<'tcx>,
     pub llunit_ty: Type,
index 2cc40a617950843affa2364d296169b9e6039195..5b76f5bb8270e77b12f76f81cf664a3cb8aec423 100644 (file)
@@ -26,7 +26,7 @@
 
 use libc::c_uint;
 
-#[deriving(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Show)]
 #[repr(C)]
 pub struct Type {
     rf: TypeRef
index 94f75f4804efbf6f723da1d26d94829cd77b99e2..fbbf2ac80d51e278fca7df3504fe0d16417188f6 100644 (file)
@@ -446,7 +446,7 @@ pub fn align_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>)
 }
 
 // Want refinements! (Or case classes, I guess
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum named_ty {
     a_struct,
     an_enum,
index 028e2154303e23db409a03e10eb84ff9ee9859a6..b6fd2eb57be27c7b8a953b21faef93363038c665 100644 (file)
@@ -14,7 +14,7 @@
 use trans::common::Block;
 use libc::c_uint;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Value(pub ValueRef);
 
 macro_rules! opt_val { ($e:expr) => (
@@ -125,7 +125,7 @@ pub fn is_a_terminator_inst(self) -> bool {
 }
 
 /// Wrapper for LLVM UseRef
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Use(UseRef);
 
 impl Use {
index 92b8c2bbcf718152acf80d06b5256cb683bcf355..ad43dd84ef6b29180eebc31e181bc04f924764fa 100644 (file)
@@ -45,7 +45,7 @@ pub enum MethodError {
 
 // A pared down enum describing just the places from which a method
 // candidate can arise. Used for error reporting only.
-#[deriving(Copy, PartialOrd, Ord, PartialEq, Eq)]
+#[derive(Copy, PartialOrd, Ord, PartialEq, Eq)]
 pub enum CandidateSource {
     ImplSource(ast::DefId),
     TraitSource(/* trait id */ ast::DefId),
index e3813fc8951f7b208420fc84064e87ddfa22e982..8adb592633f5edd7070252727e7d573d6f8aa594 100644 (file)
@@ -70,7 +70,7 @@ pub struct Pick<'tcx> {
     pub kind: PickKind<'tcx>,
 }
 
-#[deriving(Clone,Show)]
+#[derive(Clone,Show)]
 pub enum PickKind<'tcx> {
     InherentImplPick(/* Impl */ ast::DefId),
     ObjectPick(/* Trait */ ast::DefId, /* method_num */ uint, /* real_index */ uint),
@@ -85,7 +85,7 @@ pub enum PickKind<'tcx> {
 // difference is that it doesn't embed any regions or other
 // specifics. The "confirmation" step recreates those details as
 // needed.
-#[deriving(Clone,Show)]
+#[derive(Clone,Show)]
 pub enum PickAdjustment {
     // Indicates that the source expression should be autoderef'd N times
     //
index 01d61d446799130cc9eeadd2ac0501f7d5a6960c..e6ae5f0a447d30c779298e248918756092d98790 100644 (file)
@@ -170,7 +170,7 @@ pub struct Inherited<'a, 'tcx: 'a> {
 
 /// When type-checking an expression, we propagate downward
 /// whatever type hint we are able in the form of an `Expectation`.
-#[deriving(Copy)]
+#[derive(Copy)]
 enum Expectation<'tcx> {
     /// We know nothing about what type this expression should have.
     NoExpectation,
@@ -221,7 +221,7 @@ fn adjust_for_branches<'a>(&self, fcx: &FnCtxt<'a, 'tcx>) -> Expectation<'tcx> {
     }
 }
 
-#[deriving(Copy, Clone)]
+#[derive(Copy, Clone)]
 pub struct UnsafetyState {
     pub def: ast::NodeId,
     pub unsafety: ast::Unsafety,
@@ -257,13 +257,13 @@ pub fn recurse(&mut self, blk: &ast::Block) -> UnsafetyState {
 /// Whether `check_binop` is part of an assignment or not.
 /// Used to know whether we allow user overloads and to print
 /// better messages on error.
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum IsBinopAssignment{
     SimpleBinop,
     BinopAssignment,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct FnCtxt<'a, 'tcx: 'a> {
     body_id: ast::NodeId,
 
@@ -2218,7 +2218,7 @@ fn anon_regions(&self, span: Span, count: uint)
     }
 }
 
-#[deriving(Copy, Show, PartialEq, Eq)]
+#[derive(Copy, Show, PartialEq, Eq)]
 pub enum LvaluePreference {
     PreferMutLvalue,
     NoPreference
@@ -3058,7 +3058,7 @@ pub fn lookup_tup_field_ty<'tcx>(tcx: &ty::ctxt<'tcx>,
 
 // Controls whether the arguments are automatically referenced. This is useful
 // for overloaded binary and unary operators.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum AutorefArgs {
     Yes,
     No,
@@ -3080,7 +3080,7 @@ pub enum AutorefArgs {
 /// Instead of:
 ///
 ///     f((1, 2));
-#[deriving(Clone, Eq, PartialEq)]
+#[derive(Clone, Eq, PartialEq)]
 enum TupleArgumentsFlag {
     DontTupleArguments,
     TupleArguments,
index ada7f982805650f7d2fa978c527254f8ae5bfbd2..4154937b3fdcd2b77b4cd561889e4ff5b101d260 100644 (file)
@@ -329,7 +329,7 @@ fn resolve<T:TypeFoldable<'tcx>>(&self, t: &T, reason: ResolveReason) -> T {
 ///////////////////////////////////////////////////////////////////////////
 // Resolution reason.
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum ResolveReason {
     ResolvingExpr(Span),
     ResolvingLocal(Span),
index c62218313f4e810142640a3d8a15feaa897dded5..b2d7d88cb11bfa5f5bb033b03853738feb4f8dbe 100644 (file)
@@ -37,7 +37,7 @@ fn anon_regions(&self,
 
 // A scope in which all regions must be explicitly named. This is used
 // for types that appear in structs and so on.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ExplicitRscope;
 
 impl RegionScope for ExplicitRscope {
index a8bc01a36fea3fa0045ac80ff3712a5c736899c1..6bef7e713af28b2bd0df4bad7ea94143580c8954 100644 (file)
@@ -230,10 +230,10 @@ pub fn infer_variance(tcx: &ty::ctxt) {
 
 type VarianceTermPtr<'a> = &'a VarianceTerm<'a>;
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 struct InferredIndex(uint);
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum VarianceTerm<'a> {
     ConstantTerm(ty::Variance),
     TransformTerm(VarianceTermPtr<'a>, VarianceTermPtr<'a>),
@@ -266,7 +266,7 @@ struct TermsContext<'a, 'tcx: 'a> {
     inferred_infos: Vec<InferredInfo<'a>> ,
 }
 
-#[deriving(Copy, Show, PartialEq)]
+#[derive(Copy, Show, PartialEq)]
 enum ParamKind {
     TypeParam,
     RegionParam
@@ -423,7 +423,7 @@ struct ConstraintContext<'a, 'tcx: 'a> {
 
 /// Declares that the variable `decl_id` appears in a location with
 /// variance `variance`.
-#[deriving(Copy)]
+#[derive(Copy)]
 struct Constraint<'a> {
     inferred: InferredIndex,
     variance: &'a VarianceTerm<'a>,
index f60334292d61e600c7a8ded776d179d29fc779e9..3f5b0eaee124f1dfef3c32644f89ba01ce92f7b8 100644 (file)
@@ -111,7 +111,7 @@ fn clean(&self, cx: &DocContext) -> Vec<U> {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Crate {
     pub name: String,
     pub src: FsPath,
@@ -193,7 +193,7 @@ fn clean(&self, cx: &DocContext) -> Crate {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct ExternalCrate {
     pub name: String,
     pub attrs: Vec<Attribute>,
@@ -226,7 +226,7 @@ fn clean(&self, cx: &DocContext) -> ExternalCrate {
 /// Anything with a source location and set of attributes and, optionally, a
 /// name. That is, anything that can be documented. This doesn't correspond
 /// directly to the AST's concept of an item; it's a strict superset.
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Item {
     /// Stringified span
     pub source: Span,
@@ -302,7 +302,7 @@ pub fn is_fn(&self) -> bool {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum ItemEnum {
     StructItem(Struct),
     EnumItem(Enum),
@@ -331,7 +331,7 @@ pub enum ItemEnum {
     AssociatedTypeItem(TyParam),
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Module {
     pub items: Vec<Item>,
     pub is_crate: bool,
@@ -398,7 +398,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum Attribute {
     Word(String),
     List(String, Vec<Attribute> ),
@@ -451,7 +451,7 @@ fn value_str(&self) -> Option<InternedString> { (**self).value_str() }
     fn meta_item_list(&self) -> Option<&[P<ast::MetaItem>]> { None }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct TyParam {
     pub name: String,
     pub did: ast::DefId,
@@ -484,7 +484,7 @@ fn clean(&self, cx: &DocContext) -> TyParam {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum TyParamBound {
     RegionBound(Lifetime),
     TraitBound(PolyTrait, ast::TraitBoundModifier)
@@ -675,7 +675,7 @@ fn clean(&self, cx: &DocContext) -> Option<Vec<TyParamBound>> {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct Lifetime(String);
 
 impl Lifetime {
@@ -725,7 +725,7 @@ fn clean(&self, cx: &DocContext) -> Option<Lifetime> {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum WherePredicate {
     BoundPredicate { ty: Type, bounds: Vec<TyParamBound> },
     RegionPredicate { lifetime: Lifetime, bounds: Vec<Lifetime>},
@@ -758,7 +758,7 @@ fn clean(&self, cx: &DocContext) -> WherePredicate {
 }
 
 // maybe use a Generic enum and use ~[Generic]?
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct Generics {
     pub lifetimes: Vec<Lifetime>,
     pub type_params: Vec<TyParam>,
@@ -786,7 +786,7 @@ fn clean(&self, cx: &DocContext) -> Generics {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Method {
     pub generics: Generics,
     pub self_: SelfTy,
@@ -825,7 +825,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct TyMethod {
     pub unsafety: ast::Unsafety,
     pub decl: FnDecl,
@@ -863,7 +863,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum SelfTy {
     SelfStatic,
     SelfValue,
@@ -884,7 +884,7 @@ fn clean(&self, cx: &DocContext) -> SelfTy {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Function {
     pub decl: FnDecl,
     pub generics: Generics,
@@ -909,7 +909,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct ClosureDecl {
     pub lifetimes: Vec<Lifetime>,
     pub decl: FnDecl,
@@ -930,14 +930,14 @@ fn clean(&self, cx: &DocContext) -> ClosureDecl {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct FnDecl {
     pub inputs: Arguments,
     pub output: FunctionRetTy,
     pub attrs: Vec<Attribute>,
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct Arguments {
     pub values: Vec<Argument>,
 }
@@ -990,7 +990,7 @@ fn clean(&self, cx: &DocContext) -> FnDecl {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct Argument {
     pub type_: Type,
     pub name: String,
@@ -1007,7 +1007,7 @@ fn clean(&self, cx: &DocContext) -> Argument {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum FunctionRetTy {
     Return(Type),
     NoReturn
@@ -1022,7 +1022,7 @@ fn clean(&self, cx: &DocContext) -> FunctionRetTy {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Trait {
     pub unsafety: ast::Unsafety,
     pub items: Vec<TraitMethod>,
@@ -1066,7 +1066,7 @@ fn clean(&self, cx: &DocContext) -> PolyTrait {
 
 /// An item belonging to a trait, whether a method or associated. Could be named
 /// TraitItem except that's already taken by an exported enum variant.
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum TraitMethod {
     RequiredMethod(Item),
     ProvidedMethod(Item),
@@ -1111,7 +1111,7 @@ fn clean(&self, cx: &DocContext) -> TraitMethod {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum ImplMethod {
     MethodImplItem(Item),
     TypeImplItem(Item),
@@ -1182,7 +1182,7 @@ fn clean(&self, cx: &DocContext) -> Item {
 }
 
 /// A trait reference, which may have higher ranked lifetimes.
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct PolyTrait {
     pub trait_: Type,
     pub lifetimes: Vec<Lifetime>
@@ -1191,7 +1191,7 @@ pub struct PolyTrait {
 /// A representation of a Type suitable for hyperlinking purposes. Ideally one can get the original
 /// type out of the AST/ty::ctxt given one of these, if more information is needed. Most importantly
 /// it does not preserve mutability or boxes.
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum Type {
     /// structs/enums/traits (anything that'd be an ast::TyPath)
     ResolvedPath {
@@ -1237,7 +1237,7 @@ pub enum Type {
     PolyTraitRef(Vec<TyParamBound>),
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Copy)]
 pub enum PrimitiveType {
     Int, I8, I16, I32, I64,
     Uint, U8, U16, U32, U64,
@@ -1249,7 +1249,7 @@ pub enum PrimitiveType {
     PrimitiveTuple,
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Copy)]
 pub enum TypeKind {
     TypeEnum,
     TypeFunction,
@@ -1505,7 +1505,7 @@ fn clean(&self, cx: &DocContext) -> Type {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum StructField {
     HiddenStructField, // inserted later by strip passes
     TypedStructField(Type),
@@ -1564,7 +1564,7 @@ fn clean(&self, _: &DocContext) -> Option<Visibility> {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Struct {
     pub struct_type: doctree::StructType,
     pub generics: Generics,
@@ -1594,7 +1594,7 @@ fn clean(&self, cx: &DocContext) -> Item {
 /// This is a more limited form of the standard Struct, different in that
 /// it lacks the things most items have (name, id, parameterization). Found
 /// only as a variant in an enum.
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct VariantStruct {
     pub struct_type: doctree::StructType,
     pub fields: Vec<Item>,
@@ -1611,7 +1611,7 @@ fn clean(&self, cx: &DocContext) -> VariantStruct {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Enum {
     pub variants: Vec<Item>,
     pub generics: Generics,
@@ -1636,7 +1636,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Variant {
     pub kind: VariantKind,
 }
@@ -1704,7 +1704,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum VariantKind {
     CLikeVariant,
     TupleVariant(Vec<Type>),
@@ -1726,7 +1726,7 @@ fn clean(&self, cx: &DocContext) -> VariantKind {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
 pub struct Span {
     pub filename: String,
     pub loline: uint,
@@ -1761,7 +1761,7 @@ fn clean(&self, cx: &DocContext) -> Span {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct Path {
     pub global: bool,
     pub segments: Vec<PathSegment>,
@@ -1776,7 +1776,7 @@ fn clean(&self, cx: &DocContext) -> Path {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub enum PathParameters {
     AngleBracketed {
         lifetimes: Vec<Lifetime>,
@@ -1808,7 +1808,7 @@ fn clean(&self, cx: &DocContext) -> PathParameters {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct PathSegment {
     pub name: String,
     pub params: PathParameters
@@ -1849,7 +1849,7 @@ fn clean(&self, _: &DocContext) -> String {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Typedef {
     pub type_: Type,
     pub generics: Generics,
@@ -1872,7 +1872,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq)]
 pub struct BareFunctionDecl {
     pub unsafety: ast::Unsafety,
     pub generics: Generics,
@@ -1895,7 +1895,7 @@ fn clean(&self, cx: &DocContext) -> BareFunctionDecl {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
 pub struct Static {
     pub type_: Type,
     pub mutability: Mutability,
@@ -1924,7 +1924,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, Show)]
 pub struct Constant {
     pub type_: Type,
     pub expr: String,
@@ -1947,7 +1947,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Show, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy)]
+#[derive(Show, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy)]
 pub enum Mutability {
     Mutable,
     Immutable,
@@ -1962,7 +1962,7 @@ fn clean(&self, _: &DocContext) -> Mutability {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Impl {
     pub generics: Generics,
     pub trait_: Option<Type>,
@@ -2000,7 +2000,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct ViewItem {
     pub inner: ViewItemInner,
 }
@@ -2066,7 +2066,7 @@ fn clean(&self, cx: &DocContext) -> Vec<Item> {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum ViewItemInner {
     ExternCrate(String, Option<String>, ast::NodeId),
     Import(ViewPath)
@@ -2089,7 +2089,7 @@ fn clean(&self, cx: &DocContext) -> ViewItemInner {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub enum ViewPath {
     // use source as str;
     SimpleImport(String, ImportSource),
@@ -2099,7 +2099,7 @@ pub enum ViewPath {
     ImportList(ImportSource, Vec<ViewListIdent>),
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct ImportSource {
     pub path: Path,
     pub did: Option<ast::DefId>,
@@ -2120,7 +2120,7 @@ fn clean(&self, cx: &DocContext) -> ViewPath {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct ViewListIdent {
     pub name: String,
     pub source: Option<ast::DefId>,
@@ -2335,7 +2335,7 @@ fn resolve_def(cx: &DocContext, id: ast::NodeId) -> Option<ast::DefId> {
     })
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Macro {
     pub source: String,
 }
@@ -2356,7 +2356,7 @@ fn clean(&self, cx: &DocContext) -> Item {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable)]
+#[derive(Clone, RustcEncodable, RustcDecodable)]
 pub struct Stability {
     pub level: attr::StabilityLevel,
     pub text: String
index 251ce5aefeb717429c5542d5d2ac10a0e7ae12b0..d05e15ff2513258016a9b37d394c919766677e37 100644 (file)
@@ -70,7 +70,7 @@ pub fn new(name: Option<Ident>) -> Module {
     }
 }
 
-#[deriving(Show, Clone, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Show, Clone, RustcEncodable, RustcDecodable, Copy)]
 pub enum StructType {
     /// A normal struct
     Plain,
@@ -143,7 +143,7 @@ pub struct Typedef {
     pub stab: Option<attr::Stability>,
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub struct Static {
     pub type_: P<ast::Ty>,
     pub mutability: ast::Mutability,
index 25a20e5998bd8ff8a6d80bd9219c07ba229af60e..157d2580ad971f8f34c9f7695e9646c6da713d76 100644 (file)
@@ -10,7 +10,7 @@
 
 use std::{io, str};
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct ExternalHtml{
     pub in_header: String,
     pub before_content: String,
index 36619566f8c8af67be8f4572a6b4131543305146..9004d11b5bccfb2ffe910a633cbb099fbe332735 100644 (file)
 
 /// Helper to render an optional visibility with a space after it (if the
 /// visibility is preset)
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct VisSpace(pub Option<ast::Visibility>);
 /// Similarly to VisSpace, this structure is used to render a function style with a
 /// space after it.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct UnsafetySpace(pub ast::Unsafety);
 /// Wrapper struct for properly emitting a method declaration.
 pub struct Method<'a>(pub &'a clean::SelfTy, pub &'a clean::FnDecl);
 /// Similar to VisSpace, but used for mutability
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct MutableSpace(pub clean::Mutability);
 /// Similar to VisSpace, but used for mutability
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct RawMutableSpace(pub clean::Mutability);
 /// Wrapper struct for properly emitting the stability level.
 pub struct Stability<'a>(pub &'a Option<clean::Stability>);
index 7c346539f6a79759fd7691efb51df7f3a4121e2e..3efaf5d491442525a5a9a6fc43b744528dbb6345 100644 (file)
@@ -19,7 +19,7 @@
 /// discriminants. JavaScript then is used to decode them into the original value.
 /// Consequently, every change to this type should be synchronized to
 /// the `itemTypes` mapping table in `static/main.js`.
-#[deriving(Copy, PartialEq, Clone)]
+#[derive(Copy, PartialEq, Clone)]
 pub enum ItemType {
     Module          = 0,
     Struct          = 1,
index 23f31580619ee8b77cad695ecdb37f46a9699fc3..d47c6010be0baa666042a89cc8f1161b2351e375 100644 (file)
@@ -13,7 +13,7 @@
 
 use externalfiles::ExternalHtml;
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Layout {
     pub logo: String,
     pub favicon: String,
index 1fce5d5969819d8341a5141f83efd0db4bb4b8ec..9d003eca27f3dd11ad067352adb3f048b85b0ac9 100644 (file)
@@ -373,7 +373,7 @@ pub fn find_testable_code(doc: &str, tests: &mut ::test::Collector) {
     }
 }
 
-#[deriving(Eq, PartialEq, Clone, Show)]
+#[derive(Eq, PartialEq, Clone, Show)]
 struct LangString {
     should_fail: bool,
     no_run: bool,
index fd9ada365bcacb69b35addf5d4fa1d495bf02dbe..338b9b3e0eba417c07efb5a046d3edb13f01d414 100644 (file)
@@ -74,7 +74,7 @@
 /// It is intended that this context is a lightweight object which can be fairly
 /// easily cloned because it is cloned per work-job (about once per item in the
 /// rustdoc tree).
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Context {
     /// Current hierarchy of components leading down to what's currently being
     /// rendered
@@ -129,7 +129,7 @@ pub struct Implementor {
 }
 
 /// Metadata about implementations for a type.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Impl {
     pub impl_: clean::Impl,
     pub dox: Option<String>,
@@ -145,7 +145,7 @@ pub struct Impl {
 /// to be a fairly large and expensive structure to clone. Instead this adheres
 /// to `Send` so it may be stored in a `Arc` instance and shared among the various
 /// rendering tasks.
-#[deriving(Default)]
+#[derive(Default)]
 pub struct Cache {
     /// Mapping of typaram ids to the name of the type parameter. This is used
     /// when pretty-printing a type (so pretty printing doesn't have to
@@ -225,7 +225,7 @@ struct SourceCollector<'a> {
 // Helper structs for rendering items/sidebars and carrying along contextual
 // information
 
-#[deriving(Copy)]
+#[derive(Copy)]
 struct Item<'a> {
     cx: &'a Context,
     item: &'a clean::Item,
index 82081a01956bb1530cae707f10599fa351875bfa..71313ea90b8ae4a42021483072e0bd315bc31e62 100644 (file)
@@ -14,7 +14,7 @@
 use std::string::String;
 
 /// A (recursive) table of contents
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub struct Toc {
     /// The levels are strictly decreasing, i.e.
     ///
@@ -38,7 +38,7 @@ fn count_entries_with_level(&self, level: u32) -> uint {
     }
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub struct TocEntry {
     level: u32,
     sec_number: String,
@@ -48,7 +48,7 @@ pub struct TocEntry {
 }
 
 /// Progressive construction of a table of contents.
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub struct TocBuilder {
     top_level: Toc,
     /// The current hierarchy of parent headings, the levels are
index 0d6d7a47c857975758f517089bf91878f487f663..690a5d19367ed9ac00c12e64ac012fa3864c225a 100644 (file)
@@ -26,9 +26,9 @@
 
 use html::render::cache;
 
-#[deriving(Zero, RustcEncodable, RustcDecodable, PartialEq, Eq)]
+#[derive(Zero, RustcEncodable, RustcDecodable, PartialEq, Eq)]
 /// The counts for each stability level.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Counts {
     pub deprecated: uint,
     pub experimental: uint,
@@ -76,7 +76,7 @@ pub fn total(&self) -> uint {
     }
 }
 
-#[deriving(RustcEncodable, RustcDecodable, PartialEq, Eq)]
+#[derive(RustcEncodable, RustcDecodable, PartialEq, Eq)]
 /// A summarized module, which includes total counts and summarized children
 /// modules.
 pub struct ModuleSummary {
index 54b390e0c3f0ab575e8eebc161c7496209b592aa..52d5a1a3af52f985fa340a87e127250ce69ec226 100644 (file)
@@ -19,7 +19,7 @@
 use std::error;
 
 /// Available encoding character sets
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum CharacterSet {
     /// The standard character set (uses `+` and `/`)
     Standard,
@@ -28,7 +28,7 @@ pub enum CharacterSet {
 }
 
 /// Available newline types
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Newline {
     /// A linefeed (i.e. Unix-style newline)
     LF,
@@ -37,7 +37,7 @@ pub enum Newline {
 }
 
 /// Contains configuration parameters for `to_base64`.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Config {
     /// Character set to use
     pub char_set: CharacterSet,
@@ -177,7 +177,7 @@ pub trait FromBase64 for Sized? {
 }
 
 /// Errors that can occur when decoding a base64 encoded string
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum FromBase64Error {
     /// The input contained a character not part of the base64 format
     InvalidBase64Byte(u8, uint),
index 977a31c240bd31e8333ca41439f772b706a3b784..c915ddaaa9c041cf2866aac617d7632f8a6ac135 100644 (file)
@@ -61,7 +61,7 @@ pub trait FromHex for Sized? {
 }
 
 /// Errors that can occur when decoding a hex encoded string
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum FromHexError {
     /// The input contained a character not part of the hex format
     InvalidHexCharacter(char, uint),
index f8f6f8c02b29b8a16abac18c6170bb74f76b31e4..73f986a97ef4978db7b9f929a972913864b2a0ca 100644 (file)
@@ -60,7 +60,7 @@
 //! To be able to encode a piece of data, it must implement the `serialize::RustcEncodable` trait.
 //! To be able to decode a piece of data, it must implement the `serialize::RustcDecodable` trait.
 //! The Rust compiler provides an annotation to automatically generate the code for these traits:
-//! `#[deriving(RustcDecodable, RustcEncodable)]`
+//! `#[derive(RustcDecodable, RustcEncodable)]`
 //!
 //! The JSON API provides an enum `json::Json` and a trait `ToJson` to encode objects.
 //! The `ToJson` trait provides a `to_json` method to convert an object into a `json::Json` value.
@@ -82,7 +82,7 @@
 //! use serialize::json;
 //!
 //! // Automatically generate `Decodable` and `Encodable` trait implementations
-//! #[deriving(RustcDecodable, RustcEncodable)]
+//! #[derive(RustcDecodable, RustcEncodable)]
 //! pub struct TestStruct  {
 //!     data_int: u8,
 //!     data_str: String,
 //! }
 //!
 //! // Only generate `RustcEncodable` trait implementation
-//! #[deriving(Encodable)]
+//! #[derive(Encodable)]
 //! pub struct ComplexNumRecord {
 //!     uid: u8,
 //!     dsc: String,
 //! use serialize::json::{self, Json, ToJson};
 //!
 //! // Only generate `Decodable` trait implementation
-//! #[deriving(Decodable)]
+//! #[derive(Decodable)]
 //! pub struct TestStruct {
 //!     data_int: u8,
 //!     data_str: String,
 use Encodable;
 
 /// Represents a json value
-#[deriving(Clone, PartialEq, PartialOrd)]
+#[derive(Clone, PartialEq, PartialOrd)]
 pub enum Json {
     I64(i64),
     U64(u64),
@@ -236,7 +236,7 @@ pub struct AsJson<'a, T: 'a> { inner: &'a T }
 pub struct AsPrettyJson<'a, T: 'a> { inner: &'a T, indent: Option<uint> }
 
 /// The errors that can arise while parsing a JSON stream.
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum ErrorCode {
     InvalidSyntax,
     InvalidNumber,
@@ -257,7 +257,7 @@ pub enum ErrorCode {
     NotUtf8,
 }
 
-#[deriving(Clone, Copy, PartialEq, Show)]
+#[derive(Clone, Copy, PartialEq, Show)]
 pub enum ParserError {
     /// msg, line, col
     SyntaxError(ErrorCode, uint, uint),
@@ -267,7 +267,7 @@ pub enum ParserError {
 // Builder and Parser have the same errors.
 pub type BuilderError = ParserError;
 
-#[deriving(Clone, PartialEq, Show)]
+#[derive(Clone, PartialEq, Show)]
 pub enum DecoderError {
     ParseError(ParserError),
     ExpectedError(string::String, string::String),
@@ -1164,7 +1164,7 @@ fn index<'a>(&'a self, idx: &uint) -> &'a Json {
 }
 
 /// The output of the streaming parser.
-#[deriving(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Show)]
 pub enum JsonEvent {
     ObjectStart,
     ObjectEnd,
@@ -1179,7 +1179,7 @@ pub enum JsonEvent {
     Error(ParserError),
 }
 
-#[deriving(PartialEq, Show)]
+#[derive(PartialEq, Show)]
 enum ParserState {
     // Parse a value in an array, true means first element.
     ParseArray(bool),
@@ -1208,7 +1208,7 @@ pub struct Stack {
 /// StackElements compose a Stack.
 /// For example, Key("foo"), Key("bar"), Index(3) and Key("x") are the
 /// StackElements compositing the stack that represents foo.bar[3].x
-#[deriving(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Show)]
 pub enum StackElement<'l> {
     Index(u32),
     Key(&'l str),
@@ -1216,7 +1216,7 @@ pub enum StackElement<'l> {
 
 // Internally, Key elements are stored as indices in a buffer to avoid
 // allocating a string for every member of an object.
-#[deriving(PartialEq, Clone, Show)]
+#[derive(PartialEq, Clone, Show)]
 enum InternalStackElement {
     InternalIndex(u32),
     InternalKey(u16, u16), // start, size
@@ -2534,7 +2534,7 @@ mod tests {
     use std::num::Float;
     use std::string;
 
-    #[deriving(RustcDecodable, Eq, PartialEq, Show)]
+    #[derive(RustcDecodable, Eq, PartialEq, Show)]
     struct OptionData {
         opt: Option<uint>,
     }
@@ -2561,20 +2561,20 @@ fn test_decode_option_malformed() {
                                 ExpectedError("Number".to_string(), "false".to_string()));
     }
 
-    #[deriving(PartialEq, RustcEncodable, RustcDecodable, Show)]
+    #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
     enum Animal {
         Dog,
         Frog(string::String, int)
     }
 
-    #[deriving(PartialEq, RustcEncodable, RustcDecodable, Show)]
+    #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
     struct Inner {
         a: (),
         b: uint,
         c: Vec<string::String>,
     }
 
-    #[deriving(PartialEq, RustcEncodable, RustcDecodable, Show)]
+    #[derive(PartialEq, RustcEncodable, RustcDecodable, Show)]
     struct Outer {
         inner: Vec<Inner>,
     }
@@ -3093,7 +3093,7 @@ fn test_decode_struct() {
         );
     }
 
-    #[deriving(RustcDecodable)]
+    #[derive(RustcDecodable)]
     struct FloatStruct {
         f: f64,
         a: Vec<f64>
@@ -3142,7 +3142,7 @@ fn test_multiline_errors() {
             Err(SyntaxError(EOFWhileParsingObject, 3u, 8u)));
     }
 
-    #[deriving(RustcDecodable)]
+    #[derive(RustcDecodable)]
     #[allow(dead_code)]
     struct DecodeStruct {
         x: f64,
@@ -3150,7 +3150,7 @@ struct DecodeStruct {
         z: string::String,
         w: Vec<DecodeStruct>
     }
-    #[deriving(RustcDecodable)]
+    #[derive(RustcDecodable)]
     enum DecodeEnum {
         A(f64),
         B(string::String)
index 16bc6b16598e046c90949dcfde7e6b5d5692a943..65cbce08543cc3c84e118f0a4b2fb7ecec1917c6 100644 (file)
@@ -121,7 +121,7 @@ macro_rules! bitflags {
     ($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
         $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
     }) => {
-        #[deriving(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
+        #[derive(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
         $(#[$attr])*
         pub struct $BitFlags {
             bits: $T,
index f81f23885f5ae7561e78f4d19deb01ec37b23dd3..4fb4f220c592a0aef6471abb7c2d36fcd4a7a573 100644 (file)
@@ -498,7 +498,7 @@ fn check_for_null(v: &[u8], buf: *mut libc::c_char) {
 ///
 /// Use with the `std::iter` module.
 #[allow(raw_pointer_deriving)]
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct CChars<'a> {
     ptr: *const libc::c_char,
     marker: marker::ContravariantLifetime<'a>,
index 20e46845f0ab1f095c5c48f56dfc5c275dc1ed89..c63484396d211a3db2e0f6a603636736b9c22c95 100644 (file)
@@ -52,7 +52,7 @@
 /// This behavior is characterized by the following condition:
 ///
 /// - if size > 0.909 * capacity: grow the map
-#[deriving(Clone)]
+#[derive(Clone)]
 struct DefaultResizePolicy;
 
 impl DefaultResizePolicy {
@@ -215,7 +215,7 @@ fn test_resize_policy() {
 /// overridden with one of the constructors.
 ///
 /// It is required that the keys implement the `Eq` and `Hash` traits, although
-/// this can frequently be achieved by using `#[deriving(Eq, Hash)]`.
+/// this can frequently be achieved by using `#[derive(Eq, Hash)]`.
 ///
 /// Relevant papers/articles:
 ///
@@ -270,7 +270,7 @@ fn test_resize_policy() {
 /// ```
 /// use std::collections::HashMap;
 ///
-/// #[deriving(Hash, Eq, PartialEq, Show)]
+/// #[derive(Hash, Eq, PartialEq, Show)]
 /// struct Viking {
 ///     name: String,
 ///     country: String,
@@ -295,7 +295,7 @@ fn test_resize_policy() {
 ///     println!("{} has {} hp", viking, health);
 /// }
 /// ```
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct HashMap<K, V, H = RandomSipHasher> {
     // All hashes are keyed on these values, to prevent hash collision attacks.
@@ -1356,7 +1356,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
     inner: table::Iter<'a, K, V>
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, K, V> Clone for Iter<'a, K, V> {
     fn clone(&self) -> Iter<'a, K, V> {
         Iter {
@@ -1388,7 +1388,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
     inner: Map<(&'a K, &'a V), &'a K, Iter<'a, K, V>, fn((&'a K, &'a V)) -> &'a K>
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, K, V> Clone for Keys<'a, K, V> {
     fn clone(&self) -> Keys<'a, K, V> {
         Keys {
@@ -1403,7 +1403,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
     inner: Map<(&'a K, &'a V), &'a V, Iter<'a, K, V>, fn((&'a K, &'a V)) -> &'a V>
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, K, V> Clone for Values<'a, K, V> {
     fn clone(&self) -> Values<'a, K, V> {
         Values {
@@ -1622,7 +1622,7 @@ fn test_insert() {
 
     thread_local! { static DROP_VECTOR: RefCell<Vec<int>> = RefCell::new(Vec::new()) }
 
-    #[deriving(Hash, PartialEq, Eq)]
+    #[derive(Hash, PartialEq, Eq)]
     struct Dropable {
         k: uint
     }
index 0a45a51f034db5a95ffee48cd012833da432979f..28c78ca3a913715315bb1a081516f7d980e74c78 100644 (file)
@@ -71,7 +71,7 @@
 ///
 /// ```
 /// use std::collections::HashSet;
-/// #[deriving(Hash, Eq, PartialEq, Show)]
+/// #[derive(Hash, Eq, PartialEq, Show)]
 /// struct Viking<'a> {
 ///     name: &'a str,
 ///     power: uint,
@@ -89,7 +89,7 @@
 ///     println!("{}", x);
 /// }
 /// ```
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct HashSet<T, H = RandomSipHasher> {
     map: HashMap<T, (), H>
index 2b999d83a98c284e5d492aab06ec2a89e8ffe52a..7c87094805deec7b08a281da3c4ac2e7c7283626 100644 (file)
@@ -124,7 +124,7 @@ struct GapThenFull<K, V, M> {
 
 /// A hash that is not zero, since we use a hash of zero to represent empty
 /// buckets.
-#[deriving(PartialEq, Copy)]
+#[derive(PartialEq, Copy)]
 pub struct SafeHash {
     hash: u64,
 }
@@ -718,7 +718,7 @@ struct RawBuckets<'a, K, V> {
     marker: marker::ContravariantLifetime<'a>,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, K, V> Clone for RawBuckets<'a, K, V> {
     fn clone(&self) -> RawBuckets<'a, K, V> {
         RawBuckets {
@@ -791,7 +791,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
     elems_left: uint,
 }
 
-// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
+// FIXME(#19839) Remove in favor of `#[derive(Clone)]`
 impl<'a, K, V> Clone for Iter<'a, K, V> {
     fn clone(&self) -> Iter<'a, K, V> {
         Iter {
index ecfe2d15ae1c26deb2ab5d5adb65fdf13323e27a..de3d75ffb324202c49001b202a2eee40b852c4a1 100644 (file)
@@ -252,7 +252,7 @@ pub unsafe fn close(handle: *mut u8) {
         dlclose(handle as *mut libc::c_void); ()
     }
 
-    #[deriving(Copy)]
+    #[derive(Copy)]
     pub enum Rtld {
         Lazy = 1,
         Now = 2,
index 737fef23c74668764b564c5e10add1858f912b43..cdd0e9bf76f86dfa91f1ca536d80810b2c10ff31 100644 (file)
@@ -11,7 +11,7 @@
 //! Generic hashing support.
 //!
 //! This module provides a generic way to compute the hash of a value. The
-//! simplest way to make a type hashable is to use `#[deriving(Hash)]`:
+//! simplest way to make a type hashable is to use `#[derive(Hash)]`:
 //!
 //! # Example
 //!
@@ -19,7 +19,7 @@
 //! use std::hash;
 //! use std::hash::Hash;
 //!
-//! #[deriving(Hash)]
+//! #[derive(Hash)]
 //! struct Person {
 //!     id: uint,
 //!     name: String,
@@ -70,7 +70,7 @@
 
 /// `RandomSipHasher` computes the SipHash algorithm from a stream of bytes
 /// initialized with random keys.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct RandomSipHasher {
     hasher: sip::SipHasher,
 }
index 852cab500f6731e714534f0e1efb369f05bf0d8a..d97f4a7bc34b6796d57e0dd81849fb0d89032597 100644 (file)
@@ -413,7 +413,7 @@ mod test {
     /// A type, free to create, primarily intended for benchmarking creation of
     /// wrappers that, just for construction, don't need a Reader/Writer that
     /// does anything useful. Is equivalent to `/dev/null` in semantics.
-    #[deriving(Clone,PartialEq,PartialOrd)]
+    #[derive(Clone,PartialEq,PartialOrd)]
     pub struct NullStream;
 
     impl Reader for NullStream {
index 1ff54fcb4843201f471da952e485debd793c13c4..5cb79d41db940a9ceb2b6325af1cd0c17aab5beb 100644 (file)
@@ -558,7 +558,7 @@ pub fn walk_dir(path: &Path) -> IoResult<Directories> {
 }
 
 /// An iterator that walks over a directory
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Directories {
     stack: Vec<Path>,
 }
index a4012b743a0cfe04d0907d0e31a9a9440836a701..1615541e37d4163f111c3d1c8af184b240d97c3c 100644 (file)
@@ -65,7 +65,7 @@ fn write(&mut self, buf: &[u8]) -> IoResult<()> {
 /// assert_eq!(w.into_inner(), vec!(0, 1, 2));
 /// ```
 #[deprecated = "use the Vec<u8> Writer implementation directly"]
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct MemWriter {
     buf: Vec<u8>,
 }
index 917ffa4ff76dab5a2dfdd47c22a8bb4598cd2e39..590231dcd827c15e87035fb5b18764e7a3d332dc 100644 (file)
 /// # FIXME
 ///
 /// Is something like this sufficient? It's kind of archaic
-#[deriving(PartialEq, Eq, Clone)]
+#[derive(PartialEq, Eq, Clone)]
 pub struct IoError {
     /// An enumeration which can be matched against for determining the flavor
     /// of error.
@@ -368,7 +368,7 @@ fn from_error(err: IoError) -> Box<Error> {
 }
 
 /// A list specifying general categories of I/O error.
-#[deriving(Copy, PartialEq, Eq, Clone, Show)]
+#[derive(Copy, PartialEq, Eq, Clone, Show)]
 pub enum IoErrorKind {
     /// Any I/O error not part of this list.
     OtherIoError,
@@ -1565,7 +1565,7 @@ fn lines<'r>(&'r mut self) -> Lines<'r, T> {
 
 /// When seeking, the resulting cursor is offset from a base by the offset given
 /// to the `seek` function. The base used is specified by this enumeration.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum SeekStyle {
     /// Seek from the beginning of the stream
     SeekSet,
@@ -1690,7 +1690,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
 /// A mode specifies how a file should be opened or created. These modes are
 /// passed to `File::open_mode` and are used to control where the file is
 /// positioned when it is initially opened.
-#[deriving(Copy, Clone, PartialEq, Eq)]
+#[derive(Copy, Clone, PartialEq, Eq)]
 pub enum FileMode {
     /// Opens a file positioned at the beginning.
     Open,
@@ -1702,7 +1702,7 @@ pub enum FileMode {
 
 /// Access permissions with which the file should be opened. `File`s
 /// opened with `Read` will return an error if written to.
-#[deriving(Copy, Clone, PartialEq, Eq)]
+#[derive(Copy, Clone, PartialEq, Eq)]
 pub enum FileAccess {
     /// Read-only access, requests to write will result in an error
     Read,
@@ -1713,7 +1713,7 @@ pub enum FileAccess {
 }
 
 /// Different kinds of files which can be identified by a call to stat
-#[deriving(Copy, PartialEq, Show, Hash, Clone)]
+#[derive(Copy, PartialEq, Show, Hash, Clone)]
 pub enum FileType {
     /// This is a normal file, corresponding to `S_IFREG`
     RegularFile,
@@ -1751,7 +1751,7 @@ pub enum FileType {
 /// println!("byte size: {}", info.size);
 /// # }
 /// ```
-#[deriving(Copy, Hash)]
+#[derive(Copy, Hash)]
 pub struct FileStat {
     /// The size of the file, in bytes
     pub size: u64,
@@ -1790,7 +1790,7 @@ pub struct FileStat {
 /// structure. This information is not necessarily platform independent, and may
 /// have different meanings or no meaning at all on some platforms.
 #[unstable]
-#[deriving(Copy, Hash)]
+#[derive(Copy, Hash)]
 pub struct UnstableFileStat {
     /// The ID of the device containing the file.
     pub device: u64,
@@ -1929,7 +1929,7 @@ mod tests {
     use prelude::v1::{Ok, Vec, Buffer, SliceExt};
     use uint;
 
-    #[deriving(Clone, PartialEq, Show)]
+    #[derive(Clone, PartialEq, Show)]
     enum BadReaderBehavior {
         GoodBehavior(uint),
         BadBehavior(uint)
index d86cb841f96cebc3e04f3e09ec205088a41e1589..24d45dcd65275a5a7531d34048ee3db7a6c21150 100644 (file)
@@ -29,7 +29,7 @@
 use vec::Vec;
 
 /// Hints to the types of sockets that are desired when looking up hosts
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum SocketType {
     Stream, Datagram, Raw
 }
@@ -38,7 +38,7 @@ pub enum SocketType {
 /// to manipulate how a query is performed.
 ///
 /// The meaning of each of these flags can be found with `man -s 3 getaddrinfo`
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Flag {
     AddrConfig,
     All,
@@ -51,7 +51,7 @@ pub enum Flag {
 
 /// A transport protocol associated with either a hint or a return value of
 /// `lookup`
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Protocol {
     TCP, UDP
 }
@@ -61,7 +61,7 @@ pub enum Protocol {
 ///
 /// For details on these fields, see their corresponding definitions via
 /// `man -s 3 getaddrinfo`
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Hint {
     pub family: uint,
     pub socktype: Option<SocketType>,
@@ -69,7 +69,7 @@ pub struct Hint {
     pub flags: uint,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Info {
     pub address: SocketAddr,
     pub family: uint,
index ba746c0109c7471e7a34cc651e28a3905e5b10b9..52b589b5f24a7f50762895dfcfa5d5eb724cf1fc 100644 (file)
@@ -31,7 +31,7 @@
 
 pub type Port = u16;
 
-#[deriving(Copy, PartialEq, Eq, Clone, Hash)]
+#[derive(Copy, PartialEq, Eq, Clone, Hash)]
 pub enum IpAddr {
     Ipv4Addr(u8, u8, u8, u8),
     Ipv6Addr(u16, u16, u16, u16, u16, u16, u16, u16)
@@ -62,7 +62,7 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Copy, PartialEq, Eq, Clone, Hash)]
+#[derive(Copy, PartialEq, Eq, Clone, Hash)]
 pub struct SocketAddr {
     pub ip: IpAddr,
     pub port: Port,
index fedc102e45d5334904a1125da4f80963bafe4f5a..5886c9cc3e287cce773223efc80ef48546860fb6 100644 (file)
@@ -97,12 +97,12 @@ pub struct Process {
 /// A representation of environment variable name
 /// It compares case-insensitive on Windows and case-sensitive everywhere else.
 #[cfg(not(windows))]
-#[deriving(PartialEq, Eq, Hash, Clone, Show)]
+#[derive(PartialEq, Eq, Hash, Clone, Show)]
 struct EnvKey(CString);
 
 #[doc(hidden)]
 #[cfg(windows)]
-#[deriving(Eq, Clone, Show)]
+#[derive(Eq, Clone, Show)]
 struct EnvKey(CString);
 
 #[cfg(windows)]
@@ -168,7 +168,7 @@ fn container_as_bytes<'a>(&'a self) -> &'a [u8] {
 ///
 /// let output = process.stdout.as_mut().unwrap().read_to_end();
 /// ```
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Command {
     // The internal data for the builder. Documented by the builder
     // methods below, and serialized into rt::rtio::ProcessConfig.
@@ -450,7 +450,7 @@ fn detach(&self) -> bool {
 }
 
 /// The output of a finished process.
-#[deriving(PartialEq, Eq, Clone)]
+#[derive(PartialEq, Eq, Clone)]
 pub struct ProcessOutput {
     /// The status (exit code) of the process.
     pub status: ProcessExit,
@@ -461,7 +461,7 @@ pub struct ProcessOutput {
 }
 
 /// Describes what to do with a standard io stream for a child process.
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub enum StdioContainer {
     /// This stream will be ignored. This is the equivalent of attaching the
     /// stream to `/dev/null`
@@ -483,7 +483,7 @@ pub enum StdioContainer {
 
 /// Describes the result of a process after it has terminated.
 /// Note that Windows have no signals, so the result is usually ExitStatus.
-#[deriving(PartialEq, Eq, Clone, Copy)]
+#[derive(PartialEq, Eq, Clone, Copy)]
 pub enum ProcessExit {
     /// Normal termination with an exit status.
     ExitStatus(int),
index cd991c5f884f5ef77be1ab416cb5619665e4ae2b..f571bed3ba2264c58893bd7a1db5ef9207ae8ebd 100644 (file)
@@ -104,7 +104,7 @@ unsafe impl Send for RaceBox {}
 unsafe impl Sync for RaceBox {}
 
 /// A synchronized wrapper around a buffered reader from stdin
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct StdinReader {
     inner: Arc<Mutex<RaceBox>>,
 }
index 51d1bacf63b9f28b2a0a61fb2b2ee230835b862f..1381ad17ea2aae3b821625dbc1e03afbdbd7e08b 100644 (file)
@@ -81,7 +81,7 @@ fn consume(&mut self, amt: uint) {
 }
 
 /// A `Writer` which ignores bytes written to it, like /dev/null.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NullWriter;
 
 impl Writer for NullWriter {
@@ -90,7 +90,7 @@ fn write(&mut self, _buf: &[u8]) -> io::IoResult<()> { Ok(()) }
 }
 
 /// A `Reader` which returns an infinite stream of 0 bytes, like /dev/zero.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ZeroReader;
 
 impl Reader for ZeroReader {
@@ -111,7 +111,7 @@ fn consume(&mut self, _amt: uint) {}
 }
 
 /// A `Reader` which is always at EOF, like /dev/null.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NullReader;
 
 impl Reader for NullReader {
@@ -163,7 +163,7 @@ fn flush(&mut self) -> io::IoResult<()> {
 
 /// A `Reader` which chains input from multiple `Reader`s, reading each to
 /// completion before moving onto the next.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct ChainedReader<I, R> {
     readers: I,
     cur_reader: Option<R>,
@@ -247,7 +247,7 @@ pub fn copy<R: Reader, W: Writer>(r: &mut R, w: &mut W) -> io::IoResult<()> {
 }
 
 /// An adaptor converting an `Iterator<u8>` to a `Reader`.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct IterReader<T> {
     iter: T,
 }
index 007d89a942dcca5ca29528e69639fbd63a848818..8f21fb0b8b97ddcaf76018c19b2a8a2f49192a3b 100644 (file)
@@ -727,7 +727,7 @@ fn $test_name() {
     test_checked_next_power_of_two! { test_checked_next_power_of_two_u64, u64 }
     test_checked_next_power_of_two! { test_checked_next_power_of_two_uint, uint }
 
-    #[deriving(PartialEq, Show)]
+    #[derive(PartialEq, Show)]
     struct Value { x: int }
 
     impl ToPrimitive for Value {
index c2d2fe2bec375c63cbcc9e5e750de8ed979b8916..20dd70f0faab2ff756a6a3c8c757731ab77cdc9d 100644 (file)
@@ -26,7 +26,7 @@
 use vec::Vec;
 
 /// A flag that specifies whether to use exponential (scientific) notation.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum ExponentFormat {
     /// Do not use exponential notation.
     ExpNone,
@@ -41,7 +41,7 @@ pub enum ExponentFormat {
 
 /// The number of digits used for emitting the fractional part of a number, if
 /// any.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum SignificantDigits {
     /// All calculable digits will be printed.
     ///
@@ -58,7 +58,7 @@ pub enum SignificantDigits {
 }
 
 /// How to emit the sign of a number.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum SignFormat {
     /// No sign will be printed. The exponent sign will also be emitted.
     SignNone,
index 2ca6bccabc0184d8f315145a013fe59bb8c6320c..771c808ab8a7a784f227fc02fefa8e1ef589f803 100644 (file)
@@ -361,7 +361,7 @@ pub fn join_paths<T: BytesContainer>(paths: &[T]) -> Result<Vec<u8>, &'static st
 }
 
 /// A low-level OS in-memory pipe.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Pipe {
     /// A file descriptor representing the reading end of the pipe. Data written
     /// on the `out` file descriptor can be read from this file descriptor.
@@ -862,7 +862,7 @@ pub enum MapOption {
 impl Copy for MapOption {}
 
 /// Possible errors when creating a map.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum MapError {
     /// # The following are POSIX-specific
     ///
index 067595c5199fdac8a7a361f2915d7f9945e70cec..ae82e201cb8555793b4f33efd2366c98fecfad5e 100644 (file)
@@ -35,7 +35,7 @@
     Map<&'a [u8], Option<&'a str>, Components<'a>, fn(&[u8]) -> Option<&str>>;
 
 /// Represents a POSIX file path
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Path {
     repr: Vec<u8>, // assumed to never be empty or contain NULs
     sepidx: Option<uint> // index of the final separator in repr
index 6c355634c06d50ddbbd8e0217f0eaa7b3b0817ec..aae8d6cadefb22935ae2e876548392cf11593b7e 100644 (file)
@@ -78,7 +78,7 @@
 //
 // The only error condition imposed here is valid utf-8. All other invalid paths are simply
 // preserved by the data structure; let the Windows API error out on them.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Path {
     repr: String, // assumed to never be empty
     prefix: Option<PathPrefix>,
@@ -969,7 +969,7 @@ pub fn is_sep_byte_verbatim(u: &u8) -> bool {
 }
 
 /// Prefix types for Path
-#[deriving(Copy, PartialEq, Clone, Show)]
+#[derive(Copy, PartialEq, Clone, Show)]
 pub enum PathPrefix {
     /// Prefix `\\?\`, uint is the length of the following component
     VerbatimPrefix(uint),
index 208e4f9e566f42ec74f4ced40517519e91338ed2..55063f1393f7435584946a1b274a226944558d48 100644 (file)
 
 /// The standard RNG. This is designed to be efficient on the current
 /// platform.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct StdRng {
     rng: IsaacWordRng,
 }
index 3fdfb5327ee1f143559965802cfa20a760202f70..7cc39d7d972485977c23d9e3870f6b5b2bdd48fe 100644 (file)
@@ -25,7 +25,7 @@
 
 #[cfg(any(not(target_arch = "arm"), target_os = "ios"))]
 #[repr(C)]
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum _Unwind_Action {
     _UA_SEARCH_PHASE = 1,
     _UA_CLEANUP_PHASE = 2,
index 6f6be2e111df478b7337bf0a4b4e2e1ed047fb39..99f791df474f4cb3f416a6705c5c4c230e21165d 100644 (file)
@@ -396,7 +396,7 @@ pub mod eabi {
     pub struct DISPATCHER_CONTEXT;
 
     #[repr(C)]
-    #[deriving(Copy)]
+    #[derive(Copy)]
     pub enum EXCEPTION_DISPOSITION {
         ExceptionContinueExecution,
         ExceptionContinueSearch,
index a529901272358604752c43e9d73e86fe907d5142..faff5f09f81e118c2928585f94654a8471842427 100644 (file)
@@ -26,7 +26,7 @@ struct Inner {
 unsafe impl Send for Inner {}
 unsafe impl Sync for Inner {}
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct SignalToken {
     inner: Arc<Inner>,
 }
index e9dc3d986ba115940a9b4a521a37f772cddb2885..de1724cbc4e89fbaf3f3c2255d1c0cdb9c950537 100644 (file)
@@ -379,7 +379,7 @@ pub struct SyncSender<T> {
 /// A `send` operation can only fail if the receiving end of a channel is
 /// disconnected, implying that the data could never be received. The error
 /// contains the data being sent as a payload so it can be recovered.
-#[deriving(PartialEq, Eq)]
+#[derive(PartialEq, Eq)]
 #[stable]
 pub struct SendError<T>(pub T);
 
@@ -387,13 +387,13 @@ pub struct SyncSender<T> {
 ///
 /// The `recv` operation can only fail if the sending half of a channel is
 /// disconnected, implying that no further messages will ever be received.
-#[deriving(PartialEq, Eq, Clone, Copy)]
+#[derive(PartialEq, Eq, Clone, Copy)]
 #[stable]
 pub struct RecvError;
 
 /// This enumeration is the list of the possible reasons that try_recv could not
 /// return data when called.
-#[deriving(PartialEq, Clone, Copy)]
+#[derive(PartialEq, Clone, Copy)]
 #[stable]
 pub enum TryRecvError {
     /// This channel is currently empty, but the sender(s) have not yet
@@ -409,7 +409,7 @@ pub enum TryRecvError {
 
 /// This enumeration is the list of the possible error outcomes for the
 /// `SyncSender::try_send` method.
-#[deriving(PartialEq, Clone)]
+#[derive(PartialEq, Clone)]
 #[stable]
 pub enum TrySendError<T> {
     /// The data could not be sent on the channel because it would require that
index f8197622f40b0b7303d88fd2bd1fb03dd3e64a4e..16adbf5aa4f69a24f6905ddeec193aa676b6feec 100644 (file)
@@ -94,7 +94,7 @@ pub struct Handle<'rx, T:'rx> {
 struct Packets { cur: *mut Handle<'static, ()> }
 
 #[doc(hidden)]
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub enum StartResult {
     Installed,
     Abort,
index ce5781dbc037c8b033ff221b967a137bdfc1c439..0eee10898bcbb1d134a7b2f786374d59863c0e96 100644 (file)
@@ -103,7 +103,7 @@ struct Buffer<T> {
     size: uint,
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub enum Failure {
     Empty,
     Disconnected,
index 86833af5654b9ef11a1367a3a8b50bccfc475e35..3f67b284f688794d2611944e327463d0fce373c3 100644 (file)
@@ -31,7 +31,7 @@
 
 // FIXME: move uses of Arc and deadline tracking to std::io
 
-#[deriving(Show)]
+#[derive(Show)]
 pub enum SocketStatus {
     Readable,
     Writable,
index 097ecf338d3ae746d41470a9b5b9d5773329fe5c..9c8a5fc239ce3bd7350f6c998bc204d48a12b893 100644 (file)
@@ -291,7 +291,7 @@ struct Inner {
 
 unsafe impl Sync for Inner {}
 
-#[deriving(Clone)]
+#[derive(Clone)]
 /// A handle to a thread.
 pub struct Thread {
     inner: Arc<Inner>,
index 91d8aec01cf346896064006691b5ca9a7acc97f9..d3b4fab96810bce9de4500ef8a9d32e912e6a6db 100644 (file)
@@ -219,7 +219,7 @@ macro_rules! __thread_local_inner {
 
 /// Indicator of the state of a thread local storage key.
 #[unstable = "state querying was recently added"]
-#[deriving(Eq, PartialEq, Copy)]
+#[derive(Eq, PartialEq, Copy)]
 pub enum State {
     /// All keys are in this state whenever a thread starts. Keys will
     /// transition to the `Valid` state once the first call to `with` happens
index 41a130492c0470601970d74e7c86d8d20016bcc5..d48b0342b3bf72c5b3c40cef10eb1ede1eb799d5 100644 (file)
@@ -46,7 +46,7 @@ macro_rules! try_opt {
 
 /// ISO 8601 time duration with nanosecond precision.
 /// This also allows for the negative duration; see individual methods for details.
-#[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
 pub struct Duration {
     secs: i64,
     nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC
index b1599cb807d01be58c143a33bc53212cdd32459a..c366ced58b2a8c5d067bf51461b58ff1ab2545f3 100644 (file)
@@ -15,7 +15,7 @@
 
 use std::fmt;
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Os {
     OsWindows,
     OsMacos,
@@ -26,7 +26,7 @@ pub enum Os {
     OsDragonfly,
 }
 
-#[deriving(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy)]
+#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy)]
 pub enum Abi {
     // NB: This ordering MUST match the AbiDatas array below.
     // (This is ensured by the test indices_are_correct().)
@@ -47,7 +47,7 @@ pub enum Abi {
 }
 
 #[allow(non_camel_case_types)]
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum Architecture {
     X86,
     X86_64,
@@ -56,7 +56,7 @@ pub enum Architecture {
     Mipsel
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct AbiData {
     abi: Abi,
 
@@ -64,7 +64,7 @@ pub struct AbiData {
     name: &'static str,
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum AbiArchitecture {
     /// Not a real ABI (e.g., intrinsic)
     RustArch,
index a705872b53d9302b4a3c8480aa5035a8cab59d1c..01f66f3bbd060b2658bf6533d6c8a7cea59a5162 100644 (file)
@@ -79,7 +79,7 @@
 /// table) and a SyntaxContext to track renaming and
 /// macro expansion per Flatt et al., "Macros
 /// That Work Together"
-#[deriving(Clone, Copy, Hash, PartialOrd, Eq, Ord)]
+#[derive(Clone, Copy, Hash, PartialOrd, Eq, Ord)]
 pub struct Ident {
     pub name: Name,
     pub ctxt: SyntaxContext
@@ -157,7 +157,7 @@ fn ne(&self, other: &Ident) -> bool {
 
 /// A name is a part of an identifier, representing a string or gensym. It's
 /// the result of interning.
-#[deriving(Eq, Ord, PartialEq, PartialOrd, Hash,
+#[derive(Eq, Ord, PartialEq, PartialOrd, Hash,
            RustcEncodable, RustcDecodable, Clone, Copy)]
 pub struct Name(pub u32);
 
@@ -197,7 +197,7 @@ fn decode(d: &mut D) -> Result<Ident, E> {
 /// Function name (not all functions have names)
 pub type FnIdent = Option<Ident>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash,
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash,
            Show, Copy)]
 pub struct Lifetime {
     pub id: NodeId,
@@ -205,7 +205,7 @@ pub struct Lifetime {
     pub name: Name
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct LifetimeDef {
     pub lifetime: Lifetime,
     pub bounds: Vec<Lifetime>
@@ -214,7 +214,7 @@ pub struct LifetimeDef {
 /// A "Path" is essentially Rust's notion of a name; for instance:
 /// std::cmp::PartialEq  .  It's represented as a sequence of identifiers,
 /// along with a bunch of supporting information.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Path {
     pub span: Span,
     /// A `::foo` path, is relative to the crate root rather than current
@@ -226,7 +226,7 @@ pub struct Path {
 
 /// A segment of a path: an identifier, an optional lifetime, and a set of
 /// types.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct PathSegment {
     /// The identifier portion of this path segment.
     pub identifier: Ident,
@@ -239,7 +239,7 @@ pub struct PathSegment {
     pub parameters: PathParameters,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum PathParameters {
     AngleBracketedParameters(AngleBracketedParameterData),
     ParenthesizedParameters(ParenthesizedParameterData),
@@ -317,7 +317,7 @@ pub fn bindings(&self) -> Vec<&P<TypeBinding>> {
 }
 
 /// A path like `Foo<'a, T>`
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct AngleBracketedParameterData {
     /// The lifetime parameters for this path segment.
     pub lifetimes: Vec<Lifetime>,
@@ -335,7 +335,7 @@ fn is_empty(&self) -> bool {
 }
 
 /// A path like `Foo(A,B) -> C`
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct ParenthesizedParameterData {
     /// `(A,B)`
     pub inputs: Vec<P<Ty>>,
@@ -348,7 +348,7 @@ pub struct ParenthesizedParameterData {
 
 pub type NodeId = u32;
 
-#[deriving(Clone, Eq, Ord, PartialOrd, PartialEq, RustcEncodable,
+#[derive(Clone, Eq, Ord, PartialOrd, PartialEq, RustcEncodable,
            RustcDecodable, Hash, Show, Copy)]
 pub struct DefId {
     pub krate: CrateNum,
@@ -369,7 +369,7 @@ pub struct DefId {
 /// typeck::collect::compute_bounds matches these against
 /// the "special" built-in traits (see middle::lang_items) and
 /// detects Copy, Send and Sync.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum TyParamBound {
     TraitTyParamBound(PolyTraitRef, TraitBoundModifier),
     RegionTyParamBound(Lifetime)
@@ -377,7 +377,7 @@ pub enum TyParamBound {
 
 /// A modifier on a bound, currently this is only used for `?Sized`, where the
 /// modifier is `Maybe`. Negative bounds should also be handled here.
-#[deriving(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum TraitBoundModifier {
     None,
     Maybe,
@@ -385,7 +385,7 @@ pub enum TraitBoundModifier {
 
 pub type TyParamBounds = OwnedSlice<TyParamBound>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct TyParam {
     pub ident: Ident,
     pub id: NodeId,
@@ -396,7 +396,7 @@ pub struct TyParam {
 
 /// Represents lifetimes and type parameters attached to a declaration
 /// of a function, enum, trait, etc.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Generics {
     pub lifetimes: Vec<LifetimeDef>,
     pub ty_params: OwnedSlice<TyParam>,
@@ -415,34 +415,34 @@ pub fn is_type_parameterized(&self) -> bool {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct WhereClause {
     pub id: NodeId,
     pub predicates: Vec<WherePredicate>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum WherePredicate {
     BoundPredicate(WhereBoundPredicate),
     RegionPredicate(WhereRegionPredicate),
     EqPredicate(WhereEqPredicate)
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct WhereBoundPredicate {
     pub span: Span,
     pub bounded_ty: P<Ty>,
     pub bounds: OwnedSlice<TyParamBound>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct WhereRegionPredicate {
     pub span: Span,
     pub lifetime: Lifetime,
     pub bounds: Vec<Lifetime>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct WhereEqPredicate {
     pub id: NodeId,
     pub span: Span,
@@ -454,7 +454,7 @@ pub struct WhereEqPredicate {
 /// used to drive conditional compilation
 pub type CrateConfig = Vec<P<MetaItem>> ;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Crate {
     pub module: Mod,
     pub attrs: Vec<Attribute>,
@@ -465,7 +465,7 @@ pub struct Crate {
 
 pub type MetaItem = Spanned<MetaItem_>;
 
-#[deriving(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum MetaItem_ {
     MetaWord(InternedString),
     MetaList(InternedString, Vec<P<MetaItem>>),
@@ -497,7 +497,7 @@ fn eq(&self, other: &MetaItem_) -> bool {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Block {
     pub view_items: Vec<ViewItem>,
     pub stmts: Vec<P<Stmt>>,
@@ -507,27 +507,27 @@ pub struct Block {
     pub span: Span,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Pat {
     pub id: NodeId,
     pub node: Pat_,
     pub span: Span,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct FieldPat {
     pub ident: Ident,
     pub pat: P<Pat>,
     pub is_shorthand: bool,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum BindingMode {
     BindByRef(Mutability),
     BindByValue(Mutability),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum PatWildKind {
     /// Represents the wildcard pattern `_`
     PatWildSingle,
@@ -536,7 +536,7 @@ pub enum PatWildKind {
     PatWildMulti,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Pat_ {
     /// Represents a wildcard pattern (either `_` or `..`)
     PatWild(PatWildKind),
@@ -565,13 +565,13 @@ pub enum Pat_ {
     PatMac(Mac),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum Mutability {
     MutMutable,
     MutImmutable,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum BinOp {
     BiAdd,
     BiSub,
@@ -593,7 +593,7 @@ pub enum BinOp {
     BiGt,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum UnOp {
     UnUniq,
     UnDeref,
@@ -603,7 +603,7 @@ pub enum UnOp {
 
 pub type Stmt = Spanned<Stmt_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Stmt_ {
     /// Could be an item or a local (let) binding:
     StmtDecl(P<Decl>, NodeId),
@@ -617,7 +617,7 @@ pub enum Stmt_ {
     StmtMac(P<Mac>, MacStmtStyle),
 }
 
-#[deriving(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum MacStmtStyle {
     /// The macro statement had a trailing semicolon, e.g. `foo! { ... };`
     /// `foo!(...);`, `foo![...];`
@@ -632,7 +632,7 @@ pub enum MacStmtStyle {
 
 /// Where a local declaration came from: either a true `let ... =
 /// ...;`, or one desugared from the pattern of a for loop.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum LocalSource {
     LocalLet,
     LocalFor,
@@ -641,7 +641,7 @@ pub enum LocalSource {
 // FIXME (pending discussion of #1697, #2178...): local should really be
 // a refinement on pat.
 /// Local represents a `let` statement, e.g., `let <pat>:<ty> = <expr>;`
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Local {
     pub pat: P<Pat>,
     pub ty: Option<P<Ty>>,
@@ -653,7 +653,7 @@ pub struct Local {
 
 pub type Decl = Spanned<Decl_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Decl_ {
     /// A local (let) binding:
     DeclLocal(P<Local>),
@@ -662,7 +662,7 @@ pub enum Decl_ {
 }
 
 /// represents one arm of a 'match'
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Arm {
     pub attrs: Vec<Attribute>,
     pub pats: Vec<P<Pat>>,
@@ -670,7 +670,7 @@ pub struct Arm {
     pub body: P<Expr>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Field {
     pub ident: SpannedIdent,
     pub expr: P<Expr>,
@@ -679,26 +679,26 @@ pub struct Field {
 
 pub type SpannedIdent = Spanned<Ident>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum BlockCheckMode {
     DefaultBlock,
     UnsafeBlock(UnsafeSource),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum UnsafeSource {
     CompilerGenerated,
     UserProvided,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Expr {
     pub id: NodeId,
     pub node: Expr_,
     pub span: Span,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Expr_ {
     /// First expr is the place; second expr is the value.
     ExprBox(Option<P<Expr>>, P<Expr>),
@@ -760,28 +760,28 @@ pub enum Expr_ {
 ///     <Vec<T> as SomeTrait>::SomeAssociatedItem
 ///      ^~~~~     ^~~~~~~~~   ^~~~~~~~~~~~~~~~~~
 ///      self_type  trait_name  item_name
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct QPath {
     pub self_type: P<Ty>,
     pub trait_ref: P<TraitRef>,
     pub item_name: Ident, // FIXME(#20301) -- should use Name
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum MatchSource {
     Normal,
     IfLetDesugar { contains_else_clause: bool },
     WhileLetDesugar,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum CaptureClause {
     CaptureByValue,
     CaptureByRef,
 }
 
 /// A delimited sequence of token trees
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Delimited {
     /// The type of delimiter
     pub delim: token::DelimToken,
@@ -816,7 +816,7 @@ pub fn close_tt(&self) -> TokenTree {
 }
 
 /// A sequence of token treesee
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct SequenceRepetition {
     /// The sequence of token trees
     pub tts: Vec<TokenTree>,
@@ -830,7 +830,7 @@ pub struct SequenceRepetition {
 
 /// A Kleene-style [repetition operator](http://en.wikipedia.org/wiki/Kleene_star)
 /// for token sequences.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum KleeneOp {
     ZeroOrMore,
     OneOrMore,
@@ -848,7 +848,7 @@ pub enum KleeneOp {
 ///
 /// The RHS of an MBE macro is the only place `SubstNt`s are substituted.
 /// Nothing special happens to misnamed or misplaced `SubstNt`s.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 #[doc="For macro invocations; parsing is delegated to the macro"]
 pub enum TokenTree {
     /// A single token
@@ -938,14 +938,14 @@ pub fn get_span(&self) -> Span {
 /// is being invoked, and the vector of token-trees contains the source
 /// of the macro invocation.
 /// There's only one flavor, now, so this could presumably be simplified.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Mac_ {
     // NB: the additional ident for a macro_rules-style macro is actually
     // stored in the enclosing item. Oog.
     MacInvocTT(Path, Vec<TokenTree> , SyntaxContext),   // new macro-invocation
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum StrStyle {
     CookedStr,
     RawStr(uint)
@@ -953,7 +953,7 @@ pub enum StrStyle {
 
 pub type Lit = Spanned<Lit_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum Sign {
     Minus,
     Plus
@@ -969,7 +969,7 @@ pub fn new(n: T) -> Sign {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum LitIntType {
     SignedIntLit(IntTy, Sign),
     UnsignedIntLit(UintTy),
@@ -986,7 +986,7 @@ pub fn suffix_len(&self) -> uint {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Lit_ {
     LitStr(InternedString, StrStyle),
     LitBinary(Rc<Vec<u8> >),
@@ -1000,13 +1000,13 @@ pub enum Lit_ {
 
 // NB: If you change this, you'll probably want to change the corresponding
 // type structure in middle/ty.rs as well.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct MutTy {
     pub ty: P<Ty>,
     pub mutbl: Mutability,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct TypeField {
     pub ident: Ident,
     pub mt: MutTy,
@@ -1015,7 +1015,7 @@ pub struct TypeField {
 
 /// Represents a required method in a trait declaration,
 /// one without a default implementation
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct TypeMethod {
     pub ident: Ident,
     pub attrs: Vec<Attribute>,
@@ -1033,26 +1033,26 @@ pub struct TypeMethod {
 /// a default implementation A trait method is either required (meaning it
 /// doesn't have an implementation, just a signature) or provided (meaning it
 /// has a default implementation).
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum TraitItem {
     RequiredMethod(TypeMethod),
     ProvidedMethod(P<Method>),
     TypeTraitItem(P<AssociatedType>),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum ImplItem {
     MethodImplItem(P<Method>),
     TypeImplItem(P<Typedef>),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct AssociatedType {
     pub attrs: Vec<Attribute>,
     pub ty_param: TyParam,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Typedef {
     pub id: NodeId,
     pub span: Span,
@@ -1062,7 +1062,7 @@ pub struct Typedef {
     pub typ: P<Ty>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
 pub enum IntTy {
     TyI,
     TyI8,
@@ -1087,7 +1087,7 @@ pub fn suffix_len(&self) -> uint {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
 pub enum UintTy {
     TyU,
     TyU8,
@@ -1112,7 +1112,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
 pub enum FloatTy {
     TyF32,
     TyF64,
@@ -1133,7 +1133,7 @@ pub fn suffix_len(&self) -> uint {
 }
 
 // Bind a type to an associated type: `A=Foo`.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct TypeBinding {
     pub id: NodeId,
     pub ident: Ident,
@@ -1143,7 +1143,7 @@ pub struct TypeBinding {
 
 
 // NB PartialEq method appears below.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Ty {
     pub id: NodeId,
     pub node: Ty_,
@@ -1151,7 +1151,7 @@ pub struct Ty {
 }
 
 /// Not represented directly in the AST, referred to by name through a ty_path.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum PrimTy {
     TyInt(IntTy),
     TyUint(UintTy),
@@ -1161,7 +1161,7 @@ pub enum PrimTy {
     TyChar
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Copy)]
 pub enum Onceness {
     Once,
     Many
@@ -1177,7 +1177,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 /// Represents the type of a closure
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct ClosureTy {
     pub lifetimes: Vec<LifetimeDef>,
     pub unsafety: Unsafety,
@@ -1186,7 +1186,7 @@ pub struct ClosureTy {
     pub bounds: TyParamBounds,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct BareFnTy {
     pub unsafety: Unsafety,
     pub abi: Abi,
@@ -1194,7 +1194,7 @@ pub struct BareFnTy {
     pub decl: P<FnDecl>
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 /// The different kinds of types recognized by the compiler
 pub enum Ty_ {
     TyVec(P<Ty>),
@@ -1229,13 +1229,13 @@ pub enum Ty_ {
     TyInfer,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum AsmDialect {
     AsmAtt,
     AsmIntel
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct InlineAsm {
     pub asm: InternedString,
     pub asm_str_style: StrStyle,
@@ -1249,7 +1249,7 @@ pub struct InlineAsm {
 }
 
 /// represents an argument in a function header
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Arg {
     pub ty: P<Ty>,
     pub pat: P<Pat>,
@@ -1277,14 +1277,14 @@ pub fn new_self(span: Span, mutability: Mutability, self_ident: Ident) -> Arg {
 }
 
 /// represents the header (not the body) of a function declaration
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct FnDecl {
     pub inputs: Vec<Arg>,
     pub output: FunctionRetTy,
     pub variadic: bool
 }
 
-#[deriving(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash)]
+#[derive(Copy, Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash)]
 pub enum Unsafety {
     Unsafe,
     Normal,
@@ -1299,7 +1299,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum FunctionRetTy {
     /// Functions with return type ! that always
     /// raise an error or exit (i.e. never return to the caller)
@@ -1318,7 +1318,7 @@ pub fn span(&self) -> Span {
 }
 
 /// Represents the kind of 'self' associated with a method
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum ExplicitSelf_ {
     /// No self
     SelfStatic,
@@ -1332,7 +1332,7 @@ pub enum ExplicitSelf_ {
 
 pub type ExplicitSelf = Spanned<ExplicitSelf_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Method {
     pub attrs: Vec<Attribute>,
     pub id: NodeId,
@@ -1340,7 +1340,7 @@ pub struct Method {
     pub node: Method_,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Method_ {
     /// Represents a method declaration
     MethDecl(Ident,
@@ -1355,7 +1355,7 @@ pub enum Method_ {
     MethMac(Mac),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Mod {
     /// A span from the first token past `{` to the last token until `}`.
     /// For `mod foo;`, the inner span ranges from the first token
@@ -1365,31 +1365,31 @@ pub struct Mod {
     pub items: Vec<P<Item>>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct ForeignMod {
     pub abi: Abi,
     pub view_items: Vec<ViewItem>,
     pub items: Vec<P<ForeignItem>>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct VariantArg {
     pub ty: P<Ty>,
     pub id: NodeId,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum VariantKind {
     TupleVariantKind(Vec<VariantArg>),
     StructVariantKind(P<StructDef>),
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct EnumDef {
     pub variants: Vec<P<Variant>>,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Variant_ {
     pub name: Ident,
     pub attrs: Vec<Attribute>,
@@ -1401,7 +1401,7 @@ pub struct Variant_ {
 
 pub type Variant = Spanned<Variant_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum PathListItem_ {
     PathListIdent { name: Ident, id: NodeId },
     PathListMod { id: NodeId }
@@ -1419,7 +1419,7 @@ pub fn id(&self) -> NodeId {
 
 pub type ViewPath = Spanned<ViewPath_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum ViewPath_ {
 
     /// `foo::bar::baz as quux`
@@ -1436,7 +1436,7 @@ pub enum ViewPath_ {
     ViewPathList(Path, Vec<PathListItem> , NodeId)
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct ViewItem {
     pub node: ViewItem_,
     pub attrs: Vec<Attribute>,
@@ -1444,7 +1444,7 @@ pub struct ViewItem {
     pub span: Span,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum ViewItem_ {
     /// Ident: name used to refer to this crate in the code
     /// optional (InternedString,StrStyle): if present, this is a location
@@ -1460,17 +1460,17 @@ pub enum ViewItem_ {
 /// Distinguishes between Attributes that decorate items and Attributes that
 /// are contained as statements within items. These two cases need to be
 /// distinguished for pretty-printing.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum AttrStyle {
     AttrOuter,
     AttrInner,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub struct AttrId(pub uint);
 
 /// Doc-comments are promoted to attributes that have is_sugared_doc = true
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Attribute_ {
     pub id: AttrId,
     pub style: AttrStyle,
@@ -1483,13 +1483,13 @@ pub struct Attribute_ {
 /// that the ref_id is for. The impl_id maps to the "self type" of this impl.
 /// If this impl is an ItemImpl, the impl_id is redundant (it could be the
 /// same as the impl's node id).
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct TraitRef {
     pub path: Path,
     pub ref_id: NodeId,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct PolyTraitRef {
     /// The `'a` in `<'a> Foo<&'a T>`
     pub bound_lifetimes: Vec<LifetimeDef>,
@@ -1498,7 +1498,7 @@ pub struct PolyTraitRef {
     pub trait_ref: TraitRef,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum Visibility {
     Public,
     Inherited,
@@ -1513,7 +1513,7 @@ pub fn inherit_from(&self, parent_visibility: Visibility) -> Visibility {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct StructField_ {
     pub kind: StructFieldKind,
     pub id: NodeId,
@@ -1532,7 +1532,7 @@ pub fn ident(&self) -> Option<Ident> {
 
 pub type StructField = Spanned<StructField_>;
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum StructFieldKind {
     NamedField(Ident, Visibility),
     /// Element of a tuple-like struct
@@ -1548,7 +1548,7 @@ pub fn is_unnamed(&self) -> bool {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct StructDef {
     /// Fields, not including ctor
     pub fields: Vec<StructField>,
@@ -1561,7 +1561,7 @@ pub struct StructDef {
   FIXME (#3300): Should allow items to be anonymous. Right now
   we just use dummy names for anon items.
  */
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct Item {
     pub ident: Ident,
     pub attrs: Vec<Attribute>,
@@ -1571,7 +1571,7 @@ pub struct Item {
     pub span: Span,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum Item_ {
     ItemStatic(P<Ty>, Mutability, P<Expr>),
     ItemConst(P<Ty>, P<Expr>),
@@ -1613,7 +1613,7 @@ pub fn descriptive_variant(&self) -> &str {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub struct ForeignItem {
     pub ident: Ident,
     pub attrs: Vec<Attribute>,
@@ -1623,7 +1623,7 @@ pub struct ForeignItem {
     pub vis: Visibility,
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum ForeignItem_ {
     ForeignItemFn(P<FnDecl>, Generics),
     ForeignItemStatic(P<Ty>, /* is_mutbl */ bool),
@@ -1638,7 +1638,7 @@ pub fn descriptive_variant(&self) -> &str {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum UnboxedClosureKind {
     FnUnboxedClosureKind,
     FnMutUnboxedClosureKind,
@@ -1648,7 +1648,7 @@ pub enum UnboxedClosureKind {
 /// The data we save and restore about an inlined item or method.  This is not
 /// part of the AST that we parse from a file, but it becomes part of the tree
 /// that we trans.
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show)]
 pub enum InlinedItem {
     IIItem(P<Item>),
     IITraitItem(DefId /* impl id */, TraitItem),
index 7c89245f53ef71edcac54e274376a12af508bb52..53787d71eef800c72d23d424bf1f95c145486ed5 100644 (file)
@@ -41,7 +41,7 @@
 ///   - The default implementation for a trait method.
 ///
 /// To construct one, use the `Code::from_node` function.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct FnLikeNode<'a> { node: ast_map::Node<'a> }
 
 /// MaybeFnLike wraps a method that indicates if an object
@@ -81,7 +81,7 @@ fn is_fn_like(&self) -> bool {
 /// Carries either an FnLikeNode or a Block, as these are the two
 /// constructs that correspond to "code" (as in, something from which
 /// we can construct a control-flow graph).
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum Code<'a> {
     FnLikeCode(FnLikeNode<'a>),
     BlockCode(&'a Block),
index ea61415d61f56dc63766b005093d289d40eb4711..c5dbd194e3e5fae3f47ae1512153fae4f977fb7d 100644 (file)
@@ -32,7 +32,7 @@
 
 pub mod blocks;
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum PathElem {
     PathMod(Name),
     PathName(Name)
@@ -53,7 +53,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 struct LinkedPathNode<'a> {
     node: PathElem,
     next: LinkedPath<'a>,
@@ -76,7 +76,7 @@ fn next(&mut self) -> Option<PathElem> {
 }
 
 // HACK(eddyb) move this into libstd (value wrapper for slice::Iter).
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Values<'a, T:'a>(pub slice::Iter<'a, T>);
 
 impl<'a, T: Copy> Iterator for Values<'a, T> {
@@ -104,7 +104,7 @@ pub fn path_to_string<PI: Iterator<Item=PathElem>>(path: PI) -> String {
     }).to_string()
 }
 
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 pub enum Node<'ast> {
     NodeItem(&'ast Item),
     NodeForeignItem(&'ast ForeignItem),
@@ -126,7 +126,7 @@ pub enum Node<'ast> {
 
 /// Represents an entry and its parent Node ID
 /// The odd layout is to bring down the total size.
-#[deriving(Copy, Show)]
+#[derive(Copy, Show)]
 enum MapEntry<'ast> {
     /// Placeholder for holes in the map.
     NotPresent,
@@ -157,7 +157,7 @@ fn clone(&self) -> MapEntry<'ast> {
     }
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 struct InlinedParent {
     path: Vec<PathElem>,
     ii: InlinedItem
index a8393ed9d39774960fbd3e9532455ae19104c1d8..4026da6cf8e478ed48e90eeb026f1b2ca3111133 100644 (file)
@@ -343,7 +343,7 @@ pub fn empty_generics() -> Generics {
 // ______________________________________________________________________
 // Enumerating the IDs which appear in an AST
 
-#[deriving(RustcEncodable, RustcDecodable, Show, Copy)]
+#[derive(RustcEncodable, RustcDecodable, Show, Copy)]
 pub struct IdRange {
     pub min: NodeId,
     pub max: NodeId,
index 92818f063416060ff464c668edc14262bdab826c..43e23f26e930e8155d7cc8b634cbb3a18eefce57 100644 (file)
@@ -277,7 +277,7 @@ pub fn find_crate_name(attrs: &[Attribute]) -> Option<InternedString> {
     first_attr_value_str_by_name(attrs, "crate_name")
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum InlineAttr {
     InlineNone,
     InlineHint,
@@ -340,14 +340,14 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P<MetaItem>], cfg: &ast::Me
 }
 
 /// Represents the #[deprecated="foo"] and friends attributes.
-#[deriving(RustcEncodable,RustcDecodable,Clone,Show)]
+#[derive(RustcEncodable,RustcDecodable,Clone,Show)]
 pub struct Stability {
     pub level: StabilityLevel,
     pub text: Option<InternedString>
 }
 
 /// The available stability levels.
-#[deriving(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Show,Copy)]
+#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Show,Copy)]
 pub enum StabilityLevel {
     Deprecated,
     Experimental,
@@ -463,7 +463,7 @@ fn int_type_of_word(s: &str) -> Option<IntType> {
     }
 }
 
-#[deriving(PartialEq, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(PartialEq, Show, RustcEncodable, RustcDecodable, Copy)]
 pub enum ReprAttr {
     ReprAny,
     ReprInt(Span, IntType),
@@ -482,7 +482,7 @@ pub fn is_ffi_safe(&self) -> bool {
     }
 }
 
-#[deriving(Eq, Hash, PartialEq, Show, RustcEncodable, RustcDecodable, Copy)]
+#[derive(Eq, Hash, PartialEq, Show, RustcEncodable, RustcDecodable, Copy)]
 pub enum IntType {
     SignedInt(ast::IntTy),
     UnsignedInt(ast::UintTy)
index eb011faa55dc8e6636da5c47b4ade2fcfe2e6020..2c7bbcb6faf723cd50bf5d2de675049b518a4ee7 100644 (file)
@@ -36,13 +36,13 @@ pub trait Pos {
 
 /// A byte offset. Keep this small (currently 32-bits), as AST contains
 /// a lot of them.
-#[deriving(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Show)]
 pub struct BytePos(pub u32);
 
 /// A character offset. Because of multibyte utf8 characters, a byte offset
 /// is not equivalent to a character offset. The CodeMap will convert BytePos
 /// values to CharPos values as necessary.
-#[deriving(Copy, PartialEq, Hash, PartialOrd, Show)]
+#[derive(Copy, PartialEq, Hash, PartialOrd, Show)]
 pub struct CharPos(pub uint);
 
 // FIXME: Lots of boilerplate in these impls, but so far my attempts to fix
@@ -94,7 +94,7 @@ fn sub(self, rhs: CharPos) -> CharPos {
 /// are *absolute* positions from the beginning of the codemap, not positions
 /// relative to FileMaps. Methods on the CodeMap can be used to relate spans back
 /// to the original source.
-#[deriving(Clone, Copy, Show, Hash)]
+#[derive(Clone, Copy, Show, Hash)]
 pub struct Span {
     pub lo: BytePos,
     pub hi: BytePos,
@@ -105,7 +105,7 @@ pub struct Span {
 
 pub const DUMMY_SP: Span = Span { lo: BytePos(0), hi: BytePos(0), expn_id: NO_EXPANSION };
 
-#[deriving(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub struct Spanned<T> {
     pub node: T,
     pub span: Span,
@@ -188,15 +188,15 @@ pub struct FileMapAndLine { pub fm: Rc<FileMap>, pub line: uint }
 pub struct FileMapAndBytePos { pub fm: Rc<FileMap>, pub pos: BytePos }
 
 /// The syntax with which a macro was invoked.
-#[deriving(Clone, Copy, Hash, Show)]
+#[derive(Clone, Copy, Hash, Show)]
 pub enum MacroFormat {
-    /// e.g. #[deriving(...)] <item>
+    /// e.g. #[derive(...)] <item>
     MacroAttribute,
     /// e.g. `format!()`
     MacroBang
 }
 
-#[deriving(Clone, Hash, Show)]
+#[derive(Clone, Hash, Show)]
 pub struct NameAndSpan {
     /// The name of the macro that was invoked to create the thing
     /// with this Span.
@@ -210,7 +210,7 @@ pub struct NameAndSpan {
 }
 
 /// Extra information for tracking macro expansion of spans
-#[deriving(Hash, Show)]
+#[derive(Hash, Show)]
 pub struct ExpnInfo {
     /// The location of the actual macro invocation, e.g. `let x =
     /// foo!();`
@@ -231,7 +231,7 @@ pub struct ExpnInfo {
     pub callee: NameAndSpan
 }
 
-#[deriving(PartialEq, Eq, Clone, Show, Hash, RustcEncodable, RustcDecodable, Copy)]
+#[derive(PartialEq, Eq, Clone, Show, Hash, RustcEncodable, RustcDecodable, Copy)]
 pub struct ExpnId(u32);
 
 pub const NO_EXPANSION: ExpnId = ExpnId(-1);
@@ -255,7 +255,7 @@ pub struct FileLines {
 }
 
 /// Identifies an offset of a multi-byte character in a FileMap
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct MultiByteChar {
     /// The absolute offset of the character in the CodeMap
     pub pos: BytePos,
index 88dfdf6e2d8f6b85c4eb05835139b98567a2ef2e..c19c06c3155876d3e0d8d3a3e593c2564e3b0d4d 100644 (file)
@@ -28,7 +28,7 @@
 /// maximum number of lines we will print for each error; arbitrary.
 static MAX_LINES: uint = 6u;
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub enum RenderSpan {
     /// A FullSpan renders with both with an initial line for the
     /// message, prefixed by file:linenum, followed by a summary of
@@ -54,7 +54,7 @@ fn is_full_span(&self) -> bool {
     }
 }
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub enum ColorConfig {
     Auto,
     Always,
@@ -71,12 +71,12 @@ fn custom_emit(&mut self, cm: &codemap::CodeMap,
 /// This structure is used to signify that a task has panicked with a fatal error
 /// from the diagnostics. You can use this with the `Any` trait to figure out
 /// how a rustc task died (if so desired).
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct FatalError;
 
 /// Signifies that the compiler died with an explicit call to `.bug`
 /// or `.span_bug` rather than a failed assertion, etc.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct ExplicitBug;
 
 /// A span-handler is like a handler but also
@@ -222,7 +222,7 @@ pub fn mk_handler(e: Box<Emitter + Send>) -> Handler {
     }
 }
 
-#[deriving(Copy, PartialEq, Clone)]
+#[derive(Copy, PartialEq, Clone)]
 pub enum Level {
     Bug,
     Fatal,
index e56194c95cd5b07f5accacf99beff09ae3b99bd4..91cc8a24622054ceeb29af05662c51e0eea16ab2 100644 (file)
@@ -233,7 +233,7 @@ fn make_items(self: Box<MacItems>) -> Option<SmallVector<P<ast::Item>>> {
 
 /// Fill-in macro expansion result, to allow compilation to continue
 /// after hitting errors.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct DummyResult {
     expr_only: bool,
     span: Span
@@ -311,7 +311,7 @@ pub enum SyntaxExtension {
     /// A syntax extension that is attached to an item and creates new items
     /// based upon it.
     ///
-    /// `#[deriving(...)]` is an `ItemDecorator`.
+    /// `#[derive(...)]` is an `ItemDecorator`.
     Decorator(Box<ItemDecorator + 'static>),
 
     /// A syntax extension that is attached to an item and modifies it
index 10e14e0c97564aacf1256452acf0ec16836b440b..c02416bfbea3a6a7be9aa3bb3a6acee938d4149e 100644 (file)
@@ -83,7 +83,7 @@ macro_rules! md (
     trait_def.expand(cx, mitem, item, push)
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum OrderingOp {
     PartialCmpOp, LtOp, LeOp, GtOp, GeOp,
 }
index 3c8d74c14ee6393a8b918cd8ed2f7f586cc2f2ff..882136cb86259b411c7840b6a15f3de2eeb5f8aa 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! The compiler code necessary for `#[deriving(Decodable)]`. See encodable.rs for more.
+//! The compiler code necessary for `#[derive(Decodable)]`. See encodable.rs for more.
 
 use ast;
 use ast::{MetaItem, Item, Expr, MutMutable};
index 5829f34bccc5dac280e2223700933e197f986b61..b2c929123d586b6f56478c2bf73e3c790fc6d185 100644 (file)
@@ -8,14 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! The compiler code necessary to implement the `#[deriving(Encodable)]`
+//! The compiler code necessary to implement the `#[derive(Encodable)]`
 //! (and `Decodable`, in decodable.rs) extension.  The idea here is that
-//! type-defining items may be tagged with `#[deriving(Encodable, Decodable)]`.
+//! type-defining items may be tagged with `#[derive(Encodable, Decodable)]`.
 //!
 //! For example, a type like:
 //!
 //! ```ignore
-//! #[deriving(Encodable, Decodable)]
+//! #[derive(Encodable, Decodable)]
 //! struct Node { id: uint }
 //! ```
 //!
@@ -49,7 +49,7 @@
 //! references other non-built-in types.  A type definition like:
 //!
 //! ```ignore
-//! #[deriving(Encodable, Decodable)]
+//! #[derive(Encodable, Decodable)]
 //! struct Spanned<T> { node: T, span: Span }
 //! ```
 //!
index 55443dedfca48f162df662faea1945b8023423ce..8863de8757bf7ffb22abddccbb66b71301a59235 100644 (file)
@@ -1174,7 +1174,7 @@ fn expand_static_enum_method_body(&self,
     }
 }
 
-#[deriving(PartialEq)] // dogfooding!
+#[derive(PartialEq)] // dogfooding!
 enum StructType {
     Unknown, Record, Tuple
 }
index 95bdd8b9ffd2fb71116d47dfeb1efd5400c028da..a236fa33eb1fe5aac72e8dbed0665130d1610338 100644 (file)
@@ -24,7 +24,7 @@
 use ptr::P;
 
 /// The types of pointers
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum PtrTy<'a> {
     /// &'lifetime mut
     Borrowed(Option<&'a str>, ast::Mutability),
@@ -34,7 +34,7 @@ pub enum PtrTy<'a> {
 
 /// A path, e.g. `::std::option::Option::<int>` (global). Has support
 /// for type parameters and a lifetime.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Path<'a> {
     pub path: Vec<&'a str> ,
     pub lifetime: Option<&'a str>,
@@ -85,7 +85,7 @@ pub fn to_path(&self,
 }
 
 /// A type. Supports pointers, Self, and literals
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum Ty<'a> {
     Self,
     /// &/Box/ Ty
@@ -217,7 +217,7 @@ fn mk_generics(lifetimes: Vec<ast::LifetimeDef>, ty_params: Vec<ast::TyParam>)
 }
 
 /// Lifetimes and bounds on type parameters
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct LifetimeBounds<'a> {
     pub lifetimes: Vec<(&'a str, Vec<&'a str>)>,
     pub bounds: Vec<(&'a str, Vec<Path<'a>>)>,
index 9ad0ad1621765f13e71e72e2681ff838fdd20199..9ff42d85cfbb8ea6e63bc33c252548bc45049dd6 100644 (file)
@@ -99,7 +99,7 @@ fn hash_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
     }
 
     if stmts.len() == 0 {
-        cx.span_bug(trait_span, "#[deriving(Hash)] needs at least one field");
+        cx.span_bug(trait_span, "#[derive(Hash)] needs at least one field");
     }
 
     cx.expr_block(cx.block(trait_span, stmts, None))
index 2788c89676a3a1b83302b8ff3947a3e574a19ac4..0513c75cf57dae41a18394c4903ee0d20ad65899 100644 (file)
@@ -67,7 +67,7 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span,
         Struct(_) => substr.type_ident,
         EnumMatching(_, v, _) => v.node.name,
         EnumNonMatchingCollapsed(..) | StaticStruct(..) | StaticEnum(..) => {
-            cx.span_bug(span, "nonsensical .fields in `#[deriving(Show)]`")
+            cx.span_bug(span, "nonsensical .fields in `#[derive(Show)]`")
         }
     };
 
index dcf25a26e2c69e04d192970a6816c4b02c953560..e65ecc19ea1bbc7a44a63dc5bda0d53260824bec 100644 (file)
@@ -802,7 +802,7 @@ fn expand_arm(arm: ast::Arm, fld: &mut MacroExpander) -> ast::Arm {
 /// A visitor that extracts the PatIdent (binding) paths
 /// from a given thingy and puts them in a mutable
 /// array
-#[deriving(Clone)]
+#[derive(Clone)]
 struct PatIdentFinder {
     ident_accumulator: Vec<ast::Ident>
 }
@@ -1320,7 +1320,7 @@ mod test {
     // a visitor that extracts the paths
     // from a given thingy and puts them in a mutable
     // array (passed in to the traversal)
-    #[deriving(Clone)]
+    #[derive(Clone)]
     struct PathExprFinderContext {
         path_accumulator: Vec<ast::Path> ,
     }
index 500070a14d2d9f6b7281811c2ca31b2638ac38af..1f39555f4962c3217bc1dd8525ed1bedb4400b53 100644 (file)
@@ -24,7 +24,7 @@
 use std::collections::HashMap;
 use std::iter::repeat;
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum ArgumentType {
     Known(String),
     Unsigned
index 6a296333fdb6a59bb9d3fc4949177548892ed572..bac82494f28aaca0780d8f9b24ceba31fe5bf1ee 100644 (file)
@@ -39,7 +39,7 @@ pub struct SCTable {
     rename_memo: RefCell<HashMap<(SyntaxContext,Ident,Name),SyntaxContext>>,
 }
 
-#[deriving(PartialEq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
+#[derive(PartialEq, RustcEncodable, RustcDecodable, Hash, Show, Copy)]
 pub enum SyntaxContext_ {
     EmptyCtxt,
     Mark (Mrk,SyntaxContext),
@@ -312,7 +312,7 @@ fn id(n: u32, s: SyntaxContext) -> Ident {
 
     // because of the SCTable, I now need a tidy way of
     // creating syntax objects. Sigh.
-    #[deriving(Clone, PartialEq, Show)]
+    #[derive(Clone, PartialEq, Show)]
     enum TestSC {
         M(Mrk),
         R(Ident,Name)
index 65ecf701e8dfcbd433041379ea3523138d8f4150..69e473055e8e45a7be41e6dcf1fd4ddedd2c9efe 100644 (file)
 // To avoid costly uniqueness checks, we require that `MatchSeq` always has
 // a nonempty body.
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum TokenTreeOrTokenTreeVec {
     Tt(ast::TokenTree),
     TtSeq(Rc<Vec<ast::TokenTree>>),
@@ -126,13 +126,13 @@ fn get_tt(&self, index: uint) -> TokenTree {
 }
 
 /// an unzipping of `TokenTree`s
-#[deriving(Clone)]
+#[derive(Clone)]
 struct MatcherTtFrame {
     elts: TokenTreeOrTokenTreeVec,
     idx: uint,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct MatcherPos {
     stack: Vec<MatcherTtFrame>,
     top_elts: TokenTreeOrTokenTreeVec,
index 8af5e952e9a11096ea416ff75506bd1440290fcc..86e81ede8b0fe3a480b391d4f5477b0a05fa7de9 100644 (file)
@@ -24,7 +24,7 @@
 use std::collections::HashMap;
 
 ///an unzipping of `TokenTree`s
-#[deriving(Clone)]
+#[derive(Clone)]
 struct TtFrame {
     forest: TokenTree,
     idx: uint,
@@ -32,7 +32,7 @@ struct TtFrame {
     sep: Option<Token>,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct TtReader<'a> {
     pub sp_diag: &'a SpanHandler,
     /// the unzipped tree:
@@ -99,7 +99,7 @@ fn lookup_cur_matched(r: &TtReader, name: Ident) -> Option<Rc<NamedMatch>> {
     matched_opt.map(|s| lookup_cur_matched_by_matched(r, s))
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum LockstepIterSize {
     LisUnconstrained,
     LisConstraint(uint, Ident),
index 545856a27af4ccd81b911f818d091581485a051a..f75873ac1c0f79d1c0cbaa3de741b0727ed5a654 100644 (file)
@@ -107,7 +107,7 @@ enum Status {
 }
 
 /// A set of features to be used by later passes.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Features {
     pub default_type_params: bool,
     pub unboxed_closures: bool,
index 38c26e8967140c7c353b80eb9ef5e5c63adca9cb..b87e2c6abbc0c31211271a95d6027ff3b8a18fe3 100644 (file)
@@ -17,7 +17,7 @@
 
 /// A non-growable owned slice. This is a separate type to allow the
 /// representation to change.
-#[deriving(Hash, PartialEq, Eq, PartialOrd, Ord)]
+#[derive(Hash, PartialEq, Eq, PartialOrd, Ord)]
 pub struct OwnedSlice<T> {
     data: Box<[T]>
 }
index b8da8365f7e236a979af9dd199e995bb433d00c4..0d5592b57b1d112d28936cb938ae818984613793 100644 (file)
@@ -24,7 +24,7 @@
 use std::string::String;
 use std::uint;
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum CommentStyle {
     /// No code on either side of each line of the comment
     Isolated,
@@ -36,7 +36,7 @@ pub enum CommentStyle {
     BlankLine,
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Comment {
     pub style: CommentStyle,
     pub lines: Vec<String>,
@@ -327,7 +327,7 @@ fn consume_comment(rdr: &mut StringReader,
     debug!("<<< consume comment");
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Literal {
     pub lit: String,
     pub pos: BytePos,
index 0f5ff33021cc94867a0f014b177896859ffd7c17..46a124074c7a3b8aa59eca53a60601e940a4d219 100644 (file)
@@ -51,7 +51,7 @@ fn real_token(&mut self) -> TokenAndSpan {
     }
 }
 
-#[deriving(Clone, PartialEq, Eq, Show)]
+#[derive(Clone, PartialEq, Eq, Show)]
 pub struct TokenAndSpan {
     pub tok: token::Token,
     pub sp: Span,
index e3c831c09bac5cc315858a4da3837e31aec55883..e1e456f880ed7020d356fc4f8e645a0d2a7f31be 100644 (file)
@@ -22,7 +22,7 @@
 use ptr::P;
 
 /// The specific types of unsupported syntax
-#[deriving(Copy, PartialEq, Eq, Hash)]
+#[derive(Copy, PartialEq, Eq, Hash)]
 pub enum ObsoleteSyntax {
     ObsoleteOwnedType,
     ObsoleteOwnedExpr,
index 95badb5df25bfbe17c2a3fa4782b7c096e0e26fe..c0444363d4ec407d19056912925ff0165ab96bc4 100644 (file)
 
 /// How to parse a path. There are four different kinds of paths, all of which
 /// are parsed somewhat differently.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum PathParsingMode {
     /// A path with no type parameters; e.g. `foo::bar::Baz`
     NoTypesAllowed,
@@ -119,7 +119,7 @@ pub enum PathParsingMode {
 }
 
 /// How to parse a bound, whether to allow bound modifiers such as `?`.
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum BoundParsingMode {
     Bare,
     Modified,
@@ -318,7 +318,7 @@ pub struct Parser<'a> {
     pub expected_tokens: Vec<TokenType>,
 }
 
-#[deriving(PartialEq, Eq, Clone)]
+#[derive(PartialEq, Eq, Clone)]
 pub enum TokenType {
     Token(token::Token),
     Operator,
index 2745b7e13e9bb47acd69148ca03916442a281e62..1df7e2893f68a7f62bca12d1052a2c020b6d68c4 100644 (file)
@@ -30,7 +30,7 @@
 use std::rc::Rc;
 
 #[allow(non_camel_case_types)]
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
 pub enum BinOpToken {
     Plus,
     Minus,
@@ -45,7 +45,7 @@ pub enum BinOpToken {
 }
 
 /// A delimeter token
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
 pub enum DelimToken {
     /// A round parenthesis: `(` or `)`
     Paren,
@@ -55,14 +55,14 @@ pub enum DelimToken {
     Brace,
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
 pub enum IdentStyle {
     /// `::` follows the identifier with no whitespace in-between.
     ModName,
     Plain,
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
 pub enum Lit {
     Byte(ast::Name),
     Char(ast::Name),
@@ -88,7 +88,7 @@ pub fn short_name(&self) -> &'static str {
 }
 
 #[allow(non_camel_case_types)]
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show)]
 pub enum Token {
     /* Expression-operator symbols. */
     Eq,
@@ -336,7 +336,7 @@ pub fn mtwt_eq(&self, other : &Token) -> bool {
     }
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash)]
 /// For interpolation during macro expansion.
 pub enum Nonterminal {
     NtItem(P<ast::Item>),
@@ -432,7 +432,7 @@ pub mod keywords {
         pub use self::Keyword::*;
         use ast;
 
-        #[deriving(Copy)]
+        #[derive(Copy)]
         pub enum Keyword {
             $( $sk_variant, )*
             $( $rk_variant, )*
@@ -582,7 +582,7 @@ pub fn reset_ident_interner() {
 /// destroyed. In particular, they must not access string contents. This can
 /// be fixed in the future by just leaking all strings until task death
 /// somehow.
-#[deriving(Clone, PartialEq, Hash, PartialOrd, Eq, Ord)]
+#[derive(Clone, PartialEq, Hash, PartialOrd, Eq, Ord)]
 pub struct InternedString {
     string: RcStr,
 }
index a15f1ca354bffd8e870483e07dd7f288a18348f9..11cefc8719bab768119788414d5368302941e95d 100644 (file)
 use std::string;
 use std::iter::repeat;
 
-#[deriving(Clone, Copy, PartialEq)]
+#[derive(Clone, Copy, PartialEq)]
 pub enum Breaks {
     Consistent,
     Inconsistent,
 }
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct BreakToken {
     offset: int,
     blank_space: int
 }
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 pub struct BeginToken {
     offset: int,
     breaks: Breaks
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum Token {
     String(string::String, int),
     Break(BreakToken),
@@ -148,13 +148,13 @@ pub fn buf_str(toks: Vec<Token>,
     s
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum PrintStackBreak {
     Fits,
     Broken(Breaks),
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct PrintStackElem {
     offset: int,
     pbreak: PrintStackBreak
index 8e5766bdacc40c03b56c341d004f2b351d51f858..9702c79719c64ac62b20dd53fb3e8af0972d411d 100644 (file)
@@ -46,12 +46,12 @@ fn pre(&self, _state: &mut State, _node: AnnNode) -> IoResult<()> { Ok(()) }
     fn post(&self, _state: &mut State, _node: AnnNode) -> IoResult<()> { Ok(()) }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct NoAnn;
 
 impl PpAnn for NoAnn {}
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct CurrentCommentAndLiteral {
     cur_cmnt: uint,
     cur_lit: uint,
index 93fe868f52c682909887dc167bff0ab152e16c1b..e480532a41053b9e4b6fbd14ad5bc00476863527 100644 (file)
@@ -282,7 +282,7 @@ fn strip_test_functions(krate: ast::Crate) -> ast::Crate {
     })
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 enum HasTestSignature {
     Yes,
     No,
index 6e087778de9cdf0031e8db960802aea614394a4c..5f416a867e8bdb892e4b299f52ba6b9a03036dd0 100644 (file)
@@ -92,7 +92,7 @@ pub fn clear(&self) {
     }
 }
 
-#[deriving(Clone, PartialEq, Hash, PartialOrd)]
+#[derive(Clone, PartialEq, Hash, PartialOrd)]
 pub struct RcStr {
     string: Rc<String>,
 }
index a1fe63e3f6fcd27af7d9fb981c0f5d2bd7432f8e..ec6b2cfa5c39624fa8610e1b53df0512c0eb6f6c 100644 (file)
@@ -32,7 +32,7 @@
 use ptr::P;
 use owned_slice::OwnedSlice;
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum FnKind<'a> {
     /// fn foo() or extern "Abi" fn foo()
     FkItemFn(Ident, &'a Generics, Unsafety, Abi),
index 420b1100ec1cd2013aaa8e20e0c44e21af30cbba..3a442080077f33217ebe8d1a4b65f00e8cfc60d4 100644 (file)
@@ -171,7 +171,7 @@ pub mod attr {
     /// Most attributes can only be turned on and must be turned off with term.reset().
     /// The ones that can be turned off explicitly take a boolean value.
     /// Color is also represented as an attribute for convenience.
-    #[deriving(Copy)]
+    #[derive(Copy)]
     pub enum Attr {
         /// Bold (or possibly bright) mode
         Bold,
index d944d0362fbe50e481c57c3017b7d3120403d376..80d195d9218461486f28d92ed749d17143641b3c 100644 (file)
@@ -24,7 +24,7 @@
 
 
 /// A parsed terminfo database entry.
-#[deriving(Show)]
+#[derive(Show)]
 pub struct TermInfo {
     /// Names for the terminal
     pub names: Vec<String> ,
index 35d1e166e9ca4cc1744d5ad0f375105be29810e0..04238f1c96536fd08a1e0f1895a845f8ccaddef9 100644 (file)
@@ -18,7 +18,7 @@
 use std::mem::replace;
 use std::iter::repeat;
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum States {
     Nothing,
     Percent,
@@ -35,7 +35,7 @@ enum States {
     SeekIfEndPercent(int)
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 enum FormatState {
     FormatStateFlags,
     FormatStateWidth,
@@ -44,7 +44,7 @@ enum FormatState {
 
 /// Types of parameters a capability can use
 #[allow(missing_docs)]
-#[deriving(Clone)]
+#[derive(Clone)]
 pub enum Param {
     Words(String),
     Number(int)
@@ -444,7 +444,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
     Ok(output)
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 struct Flags {
     width: uint,
     precision: uint,
@@ -461,7 +461,7 @@ fn new() -> Flags {
     }
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 enum FormatOp {
     FormatDigit,
     FormatOctal,
index 6a37f2db33c4e718d5736df6cd7cfb22b7813bd7..d54930998f1539eb13fb830b4b2873a1790204b4 100644 (file)
@@ -95,7 +95,7 @@ pub mod test {
 // colons. This way if some test runner wants to arrange the tests
 // hierarchically it may.
 
-#[deriving(Clone, PartialEq, Eq, Hash)]
+#[derive(Clone, PartialEq, Eq, Hash)]
 pub enum TestName {
     StaticTestName(&'static str),
     DynTestName(String)
@@ -114,7 +114,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-#[deriving(Clone, Copy)]
+#[derive(Clone, Copy)]
 enum NamePadding {
     PadNone,
     PadOnLeft,
@@ -189,14 +189,14 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 /// This is feed into functions marked with `#[bench]` to allow for
 /// set-up & tear-down before running a piece of code repeatedly via a
 /// call to `iter`.
-#[deriving(Copy)]
+#[derive(Copy)]
 pub struct Bencher {
     iterations: u64,
     dur: Duration,
     pub bytes: u64,
 }
 
-#[deriving(Copy, Clone, Show, PartialEq, Eq, Hash)]
+#[derive(Copy, Clone, Show, PartialEq, Eq, Hash)]
 pub enum ShouldFail {
     No,
     Yes(Option<&'static str>)
@@ -204,20 +204,20 @@ pub enum ShouldFail {
 
 // The definition of a single test. A test runner will run a list of
 // these.
-#[deriving(Clone, Show, PartialEq, Eq, Hash)]
+#[derive(Clone, Show, PartialEq, Eq, Hash)]
 pub struct TestDesc {
     pub name: TestName,
     pub ignore: bool,
     pub should_fail: ShouldFail,
 }
 
-#[deriving(Show)]
+#[derive(Show)]
 pub struct TestDescAndFn {
     pub desc: TestDesc,
     pub testfn: TestFn,
 }
 
-#[deriving(Clone, RustcEncodable, RustcDecodable, PartialEq, Show, Copy)]
+#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Show, Copy)]
 pub struct Metric {
     value: f64,
     noise: f64
@@ -229,7 +229,7 @@ pub fn new(value: f64, noise: f64) -> Metric {
     }
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 pub struct MetricMap(BTreeMap<String,Metric>);
 
 impl Clone for MetricMap {
@@ -240,7 +240,7 @@ fn clone(&self) -> MetricMap {
 }
 
 /// Analysis of a single change in metric
-#[deriving(Copy, PartialEq, Show)]
+#[derive(Copy, PartialEq, Show)]
 pub enum MetricChange {
     LikelyNoise,
     MetricAdded,
@@ -285,7 +285,7 @@ pub fn test_main_static(args: &[String], tests: &[TestDescAndFn]) {
     test_main(args, owned_tests)
 }
 
-#[deriving(Copy)]
+#[derive(Copy)]
 pub enum ColorConfig {
     AutoColor,
     AlwaysColor,
@@ -510,13 +510,13 @@ pub fn opt_shard(maybestr: Option<String>) -> Option<(uint,uint)> {
 }
 
 
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub struct BenchSamples {
     ns_iter_summ: stats::Summary<f64>,
     mb_s: uint,
 }
 
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 pub enum TestResult {
     TrOk,
     TrFailed,
@@ -969,7 +969,7 @@ fn use_color(opts: &TestOpts) -> bool {
     }
 }
 
-#[deriving(Clone)]
+#[derive(Clone)]
 enum TestEvent {
     TeFiltered(Vec<TestDesc> ),
     TeWait(TestDesc, NamePadding),
index bf42743a692f51b75c19a2c30f3f71442d467b29..7459d30b663fb0aba4b357fcadb9206ef0ef5ef7 100644 (file)
@@ -127,7 +127,7 @@ pub trait Stats <T: FloatMath + FromPrimitive> for Sized? {
 }
 
 /// Extracted collection of all the summary statistics of a sample set.
-#[deriving(Clone, PartialEq)]
+#[derive(Clone, PartialEq)]
 #[allow(missing_docs)]
 pub struct Summary<T> {
     pub sum: T,
index adb4b5300c1f9615ae594fe6b761be71b92291ed..0dc1524a7cb6b2d6c69dc5b3dbcc15e82e713281 100644 (file)
@@ -80,7 +80,7 @@ mod imp {
 }
 
 /// A record specifying a time value in seconds and nanoseconds.
-#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord, RustcEncodable,
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, RustcEncodable,
            RustcDecodable, Show, Copy)]
 pub struct Timespec {
     pub sec: i64,
@@ -241,7 +241,7 @@ pub fn tzset() {
 /// also called a broken-down time value.
 // FIXME: use c_int instead of i32?
 #[repr(C)]
-#[deriving(Clone, Copy, PartialEq, Eq, Show)]
+#[derive(Clone, Copy, PartialEq, Eq, Show)]
 pub struct Tm {
     /// Seconds after the minute - [0, 60]
     pub tm_sec: i32,
@@ -423,7 +423,7 @@ pub fn rfc3339<'a>(&'a self) -> TmFmt {
     }
 }
 
-#[deriving(Copy, PartialEq)]
+#[derive(Copy, PartialEq)]
 pub enum ParseError {
     InvalidSecond,
     InvalidMinute,
index eabe044ce3b7178616adb90f2685aabed9d0a975..c530c950b1f6abf16d4c622dcb6d6be36e74bfa8 100644 (file)
@@ -79,7 +79,7 @@ pub mod str {
     pub use u_str::{utf16_items, Utf16Encoder};
 }
 
-// this lets us use #[deriving(..)]
+// this lets us use #[derive(..)]
 mod std {
     pub use core::clone;
     pub use core::cmp;
index 5a8f63f207e2721be96a15bfcadf8b83c453c5a3..e3550810010b5db482919b044769810602100445 100644 (file)
@@ -7807,7 +7807,7 @@ pub mod grapheme {
     use core::result::Result::{Ok, Err};
 
     #[allow(non_camel_case_types)]
-    #[deriving(Clone)]
+    #[derive(Clone)]
     pub enum GraphemeCat {
         GC_LV,
         GC_LVT,
index 8ec90acb711f08f1ccef6019b3db39ddb192ee59..1b0c4171134ed03631ab2a1b394adcfc5e603d9c 100644 (file)
@@ -99,7 +99,7 @@ fn trim_right(&self) -> &str {
 }
 
 /// External iterator for grapheme clusters and byte offsets.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct GraphemeIndices<'a> {
     start_offset: uint,
     iter: Graphemes<'a>,
@@ -128,7 +128,7 @@ fn next_back(&mut self) -> Option<(uint, &'a str)> {
 
 /// External iterator for a string's
 /// [grapheme clusters](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries).
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Graphemes<'a> {
     string: &'a str,
     extended: bool,
@@ -137,7 +137,7 @@ pub struct Graphemes<'a> {
 }
 
 // state machine for cluster boundary rules
-#[deriving(PartialEq,Eq)]
+#[derive(PartialEq,Eq)]
 enum GraphemeState {
     Start,
     FindExtend,
@@ -405,12 +405,12 @@ macro_rules! next { ($ret:expr) => {
 
 /// An iterator that decodes UTF-16 encoded codepoints from a vector
 /// of `u16`s.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Utf16Items<'a> {
     iter: slice::Iter<'a, u16>
 }
 /// The possibilities for values decoded from a `u16` stream.
-#[deriving(PartialEq, Eq, Clone, Show)]
+#[derive(PartialEq, Eq, Clone, Show)]
 pub enum Utf16Item {
     /// A valid codepoint.
     ScalarValue(char),
@@ -503,7 +503,7 @@ pub fn utf16_items<'a>(v: &'a [u16]) -> Utf16Items<'a> {
 }
 
 /// Iterator adaptor for encoding `char`s to UTF-16.
-#[deriving(Clone)]
+#[derive(Clone)]
 pub struct Utf16Encoder<I> {
     chars: I,
     extra: u16
index c3300c529357526e36d31763335eab41910ebee2..e3bd587742c3102ad89dd73169d2fb8928576485 100644 (file)
@@ -17,7 +17,7 @@ pub trait Foo {
     fn boo(&self) -> <Self as Foo>::A;
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 struct Bar;
 
 impl Foo for int {
index d8e277510ed106867b25182ce80af0c38358c49d..1c2ff4668954620254496632c69f5399cf775d21 100644 (file)
@@ -17,7 +17,7 @@ pub trait Foo {
     fn boo(&self) -> <Self as Foo>::A;
 }
 
-#[deriving(PartialEq)]
+#[derive(PartialEq)]
 struct Bar;
 
 impl Foo for int {