about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-04 04:50:56 +0000
committerbors <bors@rust-lang.org>2015-01-04 04:50:56 +0000
commit470118f3e915cdc8f936aca0640b28a7a3d8dc6c (patch)
tree47f99908d999aa612a4cd44932dcdc3b3a1a966a /src/libcore
parentc6c786671d692d7b13c2e5c68a53001327b4b125 (diff)
parent351409a62287c7993bc680d9dfcfa13cba9c9c0c (diff)
downloadrust-470118f3e915cdc8f936aca0640b28a7a3d8dc6c.tar.gz
rust-470118f3e915cdc8f936aca0640b28a7a3d8dc6c.zip
auto merge of #20504 : japaric/rust/derive-self, r=alexcrichton
I put the sed scripts in the commits, in case this needs a "rebase".
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/atomic.rs2
-rw-r--r--src/libcore/char.rs8
-rw-r--r--src/libcore/cmp.rs4
-rw-r--r--src/libcore/default.rs10
-rw-r--r--src/libcore/fmt/float.rs4
-rw-r--r--src/libcore/fmt/mod.rs8
-rw-r--r--src/libcore/fmt/num.rs14
-rw-r--r--src/libcore/fmt/rt.rs12
-rw-r--r--src/libcore/hash/mod.rs4
-rw-r--r--src/libcore/hash/sip.rs4
-rw-r--r--src/libcore/intrinsics.rs4
-rw-r--r--src/libcore/iter.rs52
-rw-r--r--src/libcore/kinds.rs20
-rw-r--r--src/libcore/nonzero.rs2
-rw-r--r--src/libcore/num/mod.rs2
-rw-r--r--src/libcore/ops.rs40
-rw-r--r--src/libcore/option.rs4
-rw-r--r--src/libcore/prelude.rs4
-rw-r--r--src/libcore/ptr.rs4
-rw-r--r--src/libcore/raw.rs4
-rw-r--r--src/libcore/result.rs6
-rw-r--r--src/libcore/simd.rs20
-rw-r--r--src/libcore/slice.rs8
-rw-r--r--src/libcore/str/mod.rs42
24 files changed, 141 insertions, 141 deletions
diff --git a/src/libcore/atomic.rs b/src/libcore/atomic.rs
index f653998c9bf..5d3bcb19ae8 100644
--- a/src/libcore/atomic.rs
+++ b/src/libcore/atomic.rs
@@ -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]
diff --git a/src/libcore/char.rs b/src/libcore/char.rs
index aa6028a19b3..3bd200d38d7 100644
--- a/src/libcore/char.rs
+++ b/src/libcore/char.rs
@@ -430,13 +430,13 @@ impl Char for char {
 
 /// 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 @@ impl Iterator for EscapeUnicode {
 
 /// 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),
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs
index 38906892a33..6b52d1817e9 100644
--- a/src/libcore/cmp.rs
+++ b/src/libcore/cmp.rs
@@ -44,7 +44,7 @@
 use self::Ordering::*;
 
 use kinds::Sized;
-use option::Option::{mod, Some, None};
+use option::Option::{self, Some, None};
 
 /// Trait for equality comparisons which are [partial equivalence relations](
 /// http://en.wikipedia.org/wiki/Partial_equivalence_relation).
@@ -104,7 +104,7 @@ pub trait Eq for Sized?: PartialEq<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].
diff --git a/src/libcore/default.rs b/src/libcore/default.rs
index 0632ffd9c69..8d4ecf72243 100644
--- a/src/libcore/default.rs
+++ b/src/libcore/default.rs
@@ -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,
@@ -86,12 +86,12 @@
 /// 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,
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index 27023fab858..9e62226220c 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -22,8 +22,8 @@ use num::{cast, Float, ToPrimitive};
 use num::FpCategory as Fp;
 use ops::FnOnce;
 use result::Result::Ok;
-use slice::{mod, SliceExt};
-use str::{mod, StrExt};
+use slice::{self, SliceExt};
+use str::{self, StrExt};
 
 /// A flag that specifies whether to use exponential (scientific) notation.
 pub enum ExponentFormat {
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs
index 13fbf5232f8..f49f87ff329 100644
--- a/src/libcore/fmt/mod.rs
+++ b/src/libcore/fmt/mod.rs
@@ -24,7 +24,7 @@ use result::Result::{Ok, Err};
 use result;
 use slice::SliceExt;
 use slice;
-use str::{mod, StrExt, Utf8Error};
+use str::{self, StrExt, Utf8Error};
 
 pub use self::num::radix;
 pub use self::num::Radix;
@@ -44,7 +44,7 @@ pub type Result = result::Result<(), Error>;
 /// 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 @@ impl<'a> Arguments<'a> {
 /// 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],
diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs
index e680230265a..e0724fc2da5 100644
--- a/src/libcore/fmt/num.rs
+++ b/src/libcore/fmt/num.rs
@@ -67,23 +67,23 @@ trait GenericRadix {
 }
 
 /// 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 @@ radix! { UpperHex, 16, "0x", x @  0 ...  9 => b'0' + x,
                              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 @@ impl GenericRadix for Radix {
 
 /// 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`.
diff --git a/src/libcore/fmt/rt.rs b/src/libcore/fmt/rt.rs
index 35dd0390f30..6dbda3d8445 100644
--- a/src/libcore/fmt/rt.rs
+++ b/src/libcore/fmt/rt.rs
@@ -22,14 +22,14 @@ pub use self::Position::*;
 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.
diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs
index d4d241752f2..b0a5ec9fe12 100644
--- a/src/libcore/hash/mod.rs
+++ b/src/libcore/hash/mod.rs
@@ -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,
diff --git a/src/libcore/hash/sip.rs b/src/libcore/hash/sip.rs
index 020f0f6de9b..f9da0493f3e 100644
--- a/src/libcore/hash/sip.rs
+++ b/src/libcore/hash/sip.rs
@@ -30,7 +30,7 @@ use default::Default;
 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 @@ impl Default for SipState {
 }
 
 /// `SipHasher` computes the SipHash algorithm from a stream of bytes.
-#[deriving(Clone)]
+#[derive(Clone)]
 #[allow(missing_copy_implementations)]
 pub struct SipHasher {
     k0: u64,
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index c5af7e27c6a..7e1359d5c12 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -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 @@ extern "rust-intrinsic" {
 /// `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,
 }
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index f65857b37fb..b409b79cbf5 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -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 @@ impl<T, I> IteratorOrdExt<T> for I where I: Iterator<Item=T>, T: Ord {
 }
 
 /// `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
@@ -1176,7 +1176,7 @@ impl<T: Clone> MinMaxResult<T> {
     /// # Example
     ///
     /// ```rust
-    /// use std::iter::MinMaxResult::{mod, NoElements, OneElement, MinMax};
+    /// use std::iter::MinMaxResult::{self, NoElements, OneElement, MinMax};
     ///
     /// let r: MinMaxResult<int> = NoElements;
     /// assert_eq!(r.into_option(), None);
@@ -1280,7 +1280,7 @@ impl<I> CloneIteratorExt for I where I: Iterator + Clone {
 }
 
 /// 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 @@ impl<I> RandomAccessIterator for Cycle<I> where
 }
 
 /// 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 @@ impl<T, A, B> RandomAccessIterator for Chain<A, B> where
 }
 
 /// 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 @@ impl<A, B, I, F> DoubleEndedIterator for FilterMap<A, B, I, F> where
 }
 
 /// 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 @@ impl<I> RandomAccessIterator for Enumerate<I> where I: RandomAccessIterator {
 /// 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 @@ impl<A, I, P> Iterator for TakeWhile<A, I, P> where I: Iterator<Item=A>, P: FnMu
 }
 
 /// 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 @@ impl<I> RandomAccessIterator for Skip<I> where I: RandomAccessIterator{
 }
 
 /// 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 @@ impl<A, B, I, U, F> DoubleEndedIterator for FlatMap<A, B, I, U, F> where
 
 /// 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 @@ impl<A, St, F> Iterator for Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A
 
 /// 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 @@ impl<A: Add<Output=A> + Clone> Iterator for Counter<A> {
 }
 
 /// 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 @@ impl<A: Int + ToPrimitive> DoubleEndedIterator for Range<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 @@ impl<A: Int + ToPrimitive> DoubleEndedIterator for RangeInclusive<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 @@ impl<A: Int> Iterator for RangeStep<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 @@ step_impl_no_between!(u64 i64);
 
 
 /// An iterator that repeats an element endlessly
-#[deriving(Clone)]
+#[derive(Clone)]
 #[stable]
 pub struct Repeat<A> {
     element: A
diff --git a/src/libcore/kinds.rs b/src/libcore/kinds.rs
index fb030ea45f3..e50aaef5f09 100644
--- a/src/libcore/kinds.rs
+++ b/src/libcore/kinds.rs
@@ -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 @@ pub mod marker {
     /// 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 @@ pub mod marker {
     /// 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 @@ pub mod marker {
     /// 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 @@ pub mod marker {
     /// 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 @@ pub mod marker {
     /// 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 @@ pub mod marker {
     /// 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 @@ pub mod marker {
     /// 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;
 }
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs
index ba9103520d8..087404da624 100644
--- a/src/libcore/nonzero.rs
+++ b/src/libcore/nonzero.rs
@@ -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);
 
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 254788f9a75..4793efbe02a 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -1218,7 +1218,7 @@ impl_num_cast! { f32,   to_f32 }
 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
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index bef91dbd760..2a7df5db5c9 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -29,7 +29,7 @@
 //!
 //! use std::ops::{Add, Sub};
 //!
-//! #[deriving(Show)]
+//! #[derive(Show)]
 //! struct Point {
 //!     x: int,
 //!     y: int
@@ -62,7 +62,7 @@
 use clone::Clone;
 use iter::{Step, Iterator,DoubleEndedIterator,ExactSizeIterator};
 use kinds::Sized;
-use option::Option::{mod, Some, None};
+use option::Option::{self, Some, None};
 
 /// The `Drop` trait is used to run some code when a value goes out of scope. This
 /// is sometimes called a 'destructor'.
@@ -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 @@ add_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
 ///
 /// use std::ops::Sub;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Sub for Foo {
@@ -201,7 +201,7 @@ sub_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
 ///
 /// use std::ops::Mul;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Mul for Foo {
@@ -250,7 +250,7 @@ mul_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
 ///
 /// use std::ops::Div;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Div for Foo {
@@ -299,7 +299,7 @@ div_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 f32 f64 }
 ///
 /// use std::ops::Rem;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Rem for Foo {
@@ -482,7 +482,7 @@ not_impl! { bool uint u8 u16 u32 u64 int i8 i16 i32 i64 }
 ///
 /// use std::ops::BitAnd;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl BitAnd for Foo {
@@ -531,7 +531,7 @@ bitand_impl! { bool uint u8 u16 u32 u64 int i8 i16 i32 i64 }
 ///
 /// use std::ops::BitOr;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl BitOr for Foo {
@@ -580,7 +580,7 @@ bitor_impl! { bool uint u8 u16 u32 u64 int i8 i16 i32 i64 }
 ///
 /// use std::ops::BitXor;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl BitXor for Foo {
@@ -629,7 +629,7 @@ bitxor_impl! { bool uint u8 u16 u32 u64 int i8 i16 i32 i64 }
 ///
 /// use std::ops::Shl;
 ///
-/// #[deriving(Copy)]
+/// #[derive(Copy)]
 /// struct Foo;
 ///
 /// impl Shl<Foo> for Foo {
@@ -680,7 +680,7 @@ shl_impl! { uint u8 u16 u32 u64 int i8 i16 i32 i64 }
 ///
 /// 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 @@ impl<Idx: Clone + Step> DoubleEndedIterator for Range<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 @@ impl<Idx: Clone + Step> Iterator for RangeFrom<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).
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index 92209b937d9..a9a1857ec97 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -163,7 +163,7 @@ use ops::{Deref, FnOnce};
 // 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 @@ impl<T> Default for Option<T> {
 // The Option Iterators
 /////////////////////////////////////////////////////////////////////////////
 
-#[deriving(Clone)]
+#[derive(Clone)]
 struct Item<A> {
     opt: Option<A>
 }
diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs
index 1355825e56d..64f13a8f123 100644
--- a/src/libcore/prelude.rs
+++ b/src/libcore/prelude.rs
@@ -45,8 +45,8 @@ pub use iter::{Extend, IteratorExt};
 pub use iter::{Iterator, DoubleEndedIterator};
 pub use iter::{IteratorCloneExt, CloneIteratorExt};
 pub use iter::{IteratorOrdExt, ExactSizeIterator};
-pub use option::Option::{mod, Some, None};
+pub use option::Option::{self, Some, None};
 pub use ptr::{PtrExt, MutPtrExt};
-pub use result::Result::{mod, Ok, Err};
+pub use result::Result::{self, Ok, Err};
 pub use slice::{AsSlice, SliceExt};
 pub use str::{Str, StrExt};
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index f29d7518149..9aed78d0737 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -91,11 +91,11 @@
 use mem;
 use clone::Clone;
 use intrinsics;
-use option::Option::{mod, Some, None};
+use option::Option::{self, Some, None};
 use kinds::{Send, Sized, Sync};
 
 use cmp::{PartialEq, Eq, Ord, PartialOrd, Equiv};
-use cmp::Ordering::{mod, Less, Equal, Greater};
+use cmp::Ordering::{self, Less, Equal, Greater};
 
 // FIXME #19649: instrinsic docs don't render, so these have no docs :(
 
diff --git a/src/libcore/raw.rs b/src/libcore/raw.rs
index d70c96d8c16..3bef1d15363 100644
--- a/src/libcore/raw.rs
+++ b/src/libcore/raw.rs
@@ -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 (),
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index b0ee5672e06..7135faaa765 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -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> {
@@ -236,14 +236,14 @@ use clone::Clone;
 use fmt::Show;
 use iter::{Iterator, IteratorExt, DoubleEndedIterator, FromIterator, ExactSizeIterator};
 use ops::{FnMut, FnOnce};
-use option::Option::{mod, None, Some};
+use option::Option::{self, None, Some};
 use slice::AsSlice;
 use slice;
 
 /// `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> {
diff --git a/src/libcore/simd.rs b/src/libcore/simd.rs
index 0b0e6ff95c6..66b29bab98c 100644
--- a/src/libcore/simd.rs
+++ b/src/libcore/simd.rs
@@ -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);
diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs
index d5810a38296..fd4bc4a1413 100644
--- a/src/libcore/slice.rs
+++ b/src/libcore/slice.rs
@@ -43,7 +43,7 @@ use default::Default;
 use iter::*;
 use kinds::Copy;
 use num::Int;
-use ops::{FnMut, mod};
+use ops::{FnMut, self};
 use option::Option;
 use option::Option::{None, Some};
 use result::Result;
@@ -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 @@ forward_iterator! { SplitNMut: T, &'a mut [T] }
 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 @@ impl<'a, T> Iterator for Windows<'a, T> {
 ///
 /// 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],
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 7e99e423608..07662c567e3 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -18,7 +18,7 @@
 
 use self::Searcher::{Naive, TwoWay, TwoWayLong};
 
-use cmp::{mod, Eq};
+use cmp::{self, Eq};
 use default::Default;
 use iter::range;
 use iter::ExactSizeIterator;
@@ -27,11 +27,11 @@ use kinds::Sized;
 use mem;
 use num::Int;
 use ops::{Fn, FnMut};
-use option::Option::{mod, None, Some};
+use option::Option::{self, None, Some};
 use ptr::PtrExt;
 use raw::{Repr, Slice};
-use result::Result::{mod, Ok, Err};
-use slice::{mod, SliceExt};
+use result::Result::{self, Ok, Err};
+use slice::{self, SliceExt};
 use uint;
 
 macro_rules! delegate_iter {
@@ -147,7 +147,7 @@ Section: Creating a string
 */
 
 /// 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 @@ Section: Iterators
 /// 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 @@ impl<'a> DoubleEndedIterator for Chars<'a> {
 
 /// 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 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {
 ///
 /// 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 @@ impl<'a> Fn(&'a u8) -> u8 for BytesDeref {
 }
 
 /// 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 @@ impl<'a, Sep: CharEq> Iterator for CharSplitsN<'a, Sep> {
 
 /// 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 @@ impl NaiveSearcher {
 
 /// 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 @@ impl TwoWaySearcher {
 
 /// 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 @@ impl 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 @@ impl<'a, Sized? S> Str for &'a S where S: Str {
 }
 
 /// 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>}