Skip to content

Commit

Permalink
Rollup merge of #82120 - sfackler:arguments-as-str, r=dtolnay
Browse files Browse the repository at this point in the history
Stabilize Arguments::as_str

Closes #74442
  • Loading branch information
jonas-schievink authored Feb 15, 2021
2 parents 2030a54 + 4613b37 commit c87ef21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ impl<'a> Arguments<'a> {
/// # Examples
///
/// ```rust
/// #![feature(fmt_as_str)]
///
/// use std::fmt::Arguments;
///
/// fn write_str(_: &str) { /* ... */ }
Expand All @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit c87ef21

Please sign in to comment.