Skip to content

Commit

Permalink
Unrolled build for rust-lang#132511
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#132511 - RalfJung:const_arguments_as_str, r=dtolnay

stabilize const_arguments_as_str

FCP passed in the [tracking issue](rust-lang#103900 (comment)).
  • Loading branch information
rust-timer authored Nov 3, 2024
2 parents 59ae5eb + 234d3de commit 46e9bf7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions library/core/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,9 @@ impl<'a> Arguments<'a> {
/// assert_eq!(format_args!("{:?}", std::env::current_dir()).as_str(), None);
/// ```
#[stable(feature = "fmt_as_str", since = "1.52.0")]
#[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")]
#[rustc_const_stable(feature = "const_arguments_as_str", since = "CURRENT_RUSTC_VERSION")]
#[must_use]
#[inline]
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
pub const fn as_str(&self) -> Option<&'static str> {
match (self.pieces, self.args) {
([], []) => Some(""),
Expand Down
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
#![feature(const_align_of_val_raw)]
#![feature(const_align_offset)]
#![feature(const_alloc_layout)]
#![feature(const_arguments_as_str)]
#![feature(const_black_box)]
#![feature(const_char_encode_utf16)]
#![feature(const_eval_select)]
Expand Down
3 changes: 1 addition & 2 deletions library/core/src/panic/panic_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,9 @@ impl<'a> PanicMessage<'a> {
///
/// See [`fmt::Arguments::as_str`] for details.
#[stable(feature = "panic_info_message", since = "1.81.0")]
#[rustc_const_unstable(feature = "const_arguments_as_str", issue = "103900")]
#[rustc_const_stable(feature = "const_arguments_as_str", since = "CURRENT_RUSTC_VERSION")]
#[must_use]
#[inline]
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
pub const fn as_str(&self) -> Option<&'static str> {
self.message.as_str()
}
Expand Down

0 comments on commit 46e9bf7

Please sign in to comment.