diff options
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); * } * ``` * |
