summaryrefslogtreecommitdiffstats
path: root/library/alloc/src/fmt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/fmt.rs')
-rw-r--r--library/alloc/src/fmt.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs
index 1da86e1a4..fb8d00e8d 100644
--- a/library/alloc/src/fmt.rs
+++ b/library/alloc/src/fmt.rs
@@ -363,7 +363,7 @@
//! # use std::fmt;
//! # struct Foo; // our custom type
//! # impl fmt::Display for Foo {
-//! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+//! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
//! # write!(f, "testing, testing")
//! # } }
//! ```
@@ -399,7 +399,7 @@
//! }
//!
//! impl fmt::Display for Vector2D {
-//! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+//! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
//! // The `f` value implements the `Write` trait, which is what the
//! // write! macro is expecting. Note that this formatting ignores the
//! // various flags provided to format strings.
@@ -410,7 +410,7 @@
//! // Different traits allow different forms of output of a type. The meaning
//! // of this format is to print the magnitude of a vector.
//! impl fmt::Binary for Vector2D {
-//! fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+//! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
//! let magnitude = (self.x * self.x + self.y * self.y) as f64;
//! let magnitude = magnitude.sqrt();
//!
@@ -517,7 +517,7 @@
//! let mut some_writer = io::stdout();
//! write!(&mut some_writer, "{}", format_args!("print with a {}", "macro"));
//!
-//! fn my_fmt_fn(args: fmt::Arguments) {
+//! fn my_fmt_fn(args: fmt::Arguments<'_>) {
//! write!(&mut io::stdout(), "{args}");
//! }
//! my_fmt_fn(format_args!(", or a {} too", "function"));
@@ -551,8 +551,6 @@
#![stable(feature = "rust1", since = "1.0.0")]
-#[unstable(feature = "fmt_internals", issue = "none")]
-pub use core::fmt::rt;
#[stable(feature = "fmt_flags_align", since = "1.28.0")]
pub use core::fmt::Alignment;
#[stable(feature = "rust1", since = "1.0.0")]