diff options
Diffstat (limited to 'library/core/src/fmt/builders.rs')
-rw-r--r-- | library/core/src/fmt/builders.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/core/src/fmt/builders.rs b/library/core/src/fmt/builders.rs index 7da49b04a..36f49d51c 100644 --- a/library/core/src/fmt/builders.rs +++ b/library/core/src/fmt/builders.rs @@ -60,7 +60,7 @@ impl fmt::Write for PadAdapter<'_, '_> { /// } /// /// impl fmt::Debug for Foo { -/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { /// fmt.debug_struct("Foo") /// .field("bar", &self.bar) /// .field("baz", &self.baz) @@ -109,14 +109,14 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { /// .field("bar", &self.bar) // We add `bar` field. /// .field("another", &self.another) // We add `another` field. /// // We even add a field which doesn't exist (because why not?). - /// .field("not_existing_field", &1) + /// .field("nonexistent_field", &1) /// .finish() // We're good to go! /// } /// } /// /// assert_eq!( /// format!("{:?}", Bar { bar: 10, another: "Hello World".to_string() }), - /// "Bar { bar: 10, another: \"Hello World\", not_existing_field: 1 }", + /// "Bar { bar: 10, another: \"Hello World\", nonexistent_field: 1 }", /// ); /// ``` #[stable(feature = "debug_builders", since = "1.2.0")] @@ -249,7 +249,7 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> { /// struct Foo(i32, String); /// /// impl fmt::Debug for Foo { -/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { /// fmt.debug_tuple("Foo") /// .field(&self.0) /// .field(&self.1) @@ -418,7 +418,7 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> { /// struct Foo(Vec<i32>); /// /// impl fmt::Debug for Foo { -/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { /// fmt.debug_set().entries(self.0.iter()).finish() /// } /// } @@ -548,7 +548,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> { /// struct Foo(Vec<i32>); /// /// impl fmt::Debug for Foo { -/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { /// fmt.debug_list().entries(self.0.iter()).finish() /// } /// } @@ -678,7 +678,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> { /// struct Foo(Vec<(String, i32)>); /// /// impl fmt::Debug for Foo { -/// fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +/// fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { /// fmt.debug_map().entries(self.0.iter().map(|&(ref k, ref v)| (k, v))).finish() /// } /// } |