diff options
| author | Steven Fackler <sfackler@gmail.com> | 2015-03-28 15:55:02 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2015-03-28 21:59:23 -0700 |
| commit | 3c0c8fc43a6dddda37c9e833279e0f8859a05f1c (patch) | |
| tree | f1631a63ff57806f982f5a01321a15cff2662a23 | |
| parent | 842e6cf63e632473b335cffeeaeb305c45d546fa (diff) | |
| download | rust-3c0c8fc43a6dddda37c9e833279e0f8859a05f1c.tar.gz rust-3c0c8fc43a6dddda37c9e833279e0f8859a05f1c.zip | |
Oops fix output examples
| -rw-r--r-- | src/libcore/fmt/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index e2b12b1c20d..bd802cfb559 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -696,7 +696,7 @@ impl<'a> Formatter<'a> { /// } /// } /// - /// // prints "Foo { 10, 11 }" + /// // prints "[10, 11]" /// println!("{:?}", Foo(vec![10, 11])); /// ``` #[unstable(feature = "debug_builders", reason = "method was just created")] @@ -722,7 +722,7 @@ impl<'a> Formatter<'a> { /// } /// } /// - /// // prints "Foo { 10, 11 }" + /// // prints "{10, 11}" /// println!("{:?}", Foo(vec![10, 11])); /// ``` #[unstable(feature = "debug_builders", reason = "method was just created")] @@ -744,11 +744,11 @@ impl<'a> Formatter<'a> { /// /// impl fmt::Debug for Foo { /// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - /// self.0.iter().fold(fmt.debug_map(), |b, (k, v)| b.entry(k, v)).finish() + /// self.0.iter().fold(fmt.debug_map(), |b, &(ref k, ref v)| b.entry(k, v)).finish() /// } /// } /// - /// // prints "Foo { "A": 10, "B": 11 }" + /// // prints "{"A": 10, "B": 11}" /// println!("{:?}", Foo(vec![("A".to_string(), 10), ("B".to_string(), 11)])); /// ``` #[unstable(feature = "debug_builders", reason = "method was just created")] |
