Skip to content

Commit 4f1dbe8

Browse files
authored
Rollup merge of rust-lang#82120 - sfackler:arguments-as-str, r=dtolnay
Stabilize Arguments::as_str Closes rust-lang#74442
2 parents fd29595 + 4613b37 commit 4f1dbe8

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

library/core/src/fmt/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,6 @@ impl<'a> Arguments<'a> {
401401
/// # Examples
402402
///
403403
/// ```rust
404-
/// #![feature(fmt_as_str)]
405-
///
406404
/// use std::fmt::Arguments;
407405
///
408406
/// fn write_str(_: &str) { /* ... */ }
@@ -417,13 +415,11 @@ impl<'a> Arguments<'a> {
417415
/// ```
418416
///
419417
/// ```rust
420-
/// #![feature(fmt_as_str)]
421-
///
422418
/// assert_eq!(format_args!("hello").as_str(), Some("hello"));
423419
/// assert_eq!(format_args!("").as_str(), Some(""));
424420
/// assert_eq!(format_args!("{}", 1).as_str(), None);
425421
/// ```
426-
#[unstable(feature = "fmt_as_str", issue = "74442")]
422+
#[stable(feature = "fmt_as_str", since = "1.52.0")]
427423
#[inline]
428424
pub fn as_str(&self) -> Option<&'static str> {
429425
match (self.pieces, self.args) {

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@
264264
#![feature(exhaustive_patterns)]
265265
#![feature(extend_one)]
266266
#![feature(external_doc)]
267-
#![feature(fmt_as_str)]
268267
#![feature(fn_traits)]
269268
#![feature(format_args_nl)]
270269
#![feature(gen_future)]

0 commit comments

Comments
 (0)