diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-22 11:28:01 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-27 21:44:51 -0700 |
| commit | b53454e2e413ac58da20933968cb4a86a3c7c476 (patch) | |
| tree | 049f02aae3a1c7be395a3b7467ae31af92def081 /src/libcore | |
| parent | 911cc9c35234ab12a4b9a6fc1cb35b52556f242d (diff) | |
Move std::{reflect,repr,Poly} to a libdebug crate
This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.
This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add `extern crate debug;` to the top of the
crate. Any code relying on reflection will also need to do this.
Closes #12019
[breaking-change]
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/ops.rs | 5 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 1eab5c04469..a3cb18a283e 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -27,6 +27,7 @@ * demonstrates adding and subtracting two `Point`s. * * ```rust + * #[deriving(Show)] * struct Point { * x: int, * y: int @@ -44,8 +45,8 @@ * } * } * fn main() { - * println!("{:?}", Point {x: 1, y: 0} + Point {x: 2, y: 3}); - * println!("{:?}", Point {x: 1, y: 0} - Point {x: 2, y: 3}); + * println!("{}", Point {x: 1, y: 0} + Point {x: 2, y: 3}); + * println!("{}", Point {x: 1, y: 0} - Point {x: 2, y: 3}); * } * ``` * diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 31313050165..795dd389958 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -419,7 +419,7 @@ pub trait ImmutableVector<'a, T> { * ```rust * let v = &[1,2,3,4]; * for win in v.windows(2) { - * println!("{:?}", win); + * println!("{}", win); * } * ``` * @@ -444,7 +444,7 @@ pub trait ImmutableVector<'a, T> { * ```rust * let v = &[1,2,3,4,5]; * for win in v.chunks(2) { - * println!("{:?}", win); + * println!("{}", win); * } * ``` * |
