Skip to content

Commit 3c0c8fc

Browse files
committed
Oops fix output examples
1 parent 842e6cf commit 3c0c8fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/fmt/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ impl<'a> Formatter<'a> {
696696
/// }
697697
/// }
698698
///
699-
/// // prints "Foo { 10, 11 }"
699+
/// // prints "[10, 11]"
700700
/// println!("{:?}", Foo(vec![10, 11]));
701701
/// ```
702702
#[unstable(feature = "debug_builders", reason = "method was just created")]
@@ -722,7 +722,7 @@ impl<'a> Formatter<'a> {
722722
/// }
723723
/// }
724724
///
725-
/// // prints "Foo { 10, 11 }"
725+
/// // prints "{10, 11}"
726726
/// println!("{:?}", Foo(vec![10, 11]));
727727
/// ```
728728
#[unstable(feature = "debug_builders", reason = "method was just created")]
@@ -744,11 +744,11 @@ impl<'a> Formatter<'a> {
744744
///
745745
/// impl fmt::Debug for Foo {
746746
/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
747-
/// self.0.iter().fold(fmt.debug_map(), |b, (k, v)| b.entry(k, v)).finish()
747+
/// self.0.iter().fold(fmt.debug_map(), |b, &(ref k, ref v)| b.entry(k, v)).finish()
748748
/// }
749749
/// }
750750
///
751-
/// // prints "Foo { "A": 10, "B": 11 }"
751+
/// // prints "{"A": 10, "B": 11}"
752752
/// println!("{:?}", Foo(vec![("A".to_string(), 10), ("B".to_string(), 11)]));
753753
/// ```
754754
#[unstable(feature = "debug_builders", reason = "method was just created")]

0 commit comments

Comments
 (0)