diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2021-02-15 16:07:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-15 16:07:08 +0100 |
| commit | c87ef218f95115222e124ab3e1a38b4f703175b4 (patch) | |
| tree | 8e486f7df848726f5389b9f909c909f58ab03533 | |
| parent | 2030a54f9d90201a7071deab8f008f604219c2e0 (diff) | |
| parent | 4613b3764c53f2a3e884985d7bcb99a2e40d9846 (diff) | |
| download | rust-c87ef218f95115222e124ab3e1a38b4f703175b4.tar.gz rust-c87ef218f95115222e124ab3e1a38b4f703175b4.zip | |
Rollup merge of #82120 - sfackler:arguments-as-str, r=dtolnay
Stabilize Arguments::as_str Closes #74442
| -rw-r--r-- | library/core/src/fmt/mod.rs | 6 | ||||
| -rw-r--r-- | library/std/src/lib.rs | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index 73cf5d138bf..2df5e562745 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -401,8 +401,6 @@ impl<'a> Arguments<'a> { /// # Examples /// /// ```rust - /// #![feature(fmt_as_str)] - /// /// use std::fmt::Arguments; /// /// fn write_str(_: &str) { /* ... */ } @@ -417,13 +415,11 @@ impl<'a> Arguments<'a> { /// ``` /// /// ```rust - /// #![feature(fmt_as_str)] - /// /// assert_eq!(format_args!("hello").as_str(), Some("hello")); /// assert_eq!(format_args!("").as_str(), Some("")); /// assert_eq!(format_args!("{}", 1).as_str(), None); /// ``` - #[unstable(feature = "fmt_as_str", issue = "74442")] + #[stable(feature = "fmt_as_str", since = "1.52.0")] #[inline] pub fn as_str(&self) -> Option<&'static str> { match (self.pieces, self.args) { diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index d5e00ae4be6..bc9b4702941 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -264,7 +264,6 @@ #![feature(exhaustive_patterns)] #![feature(extend_one)] #![feature(external_doc)] -#![feature(fmt_as_str)] #![feature(fn_traits)] #![feature(format_args_nl)] #![feature(gen_future)] |
