-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make fmt::Arguments::as_str
unstably const
#86655
Conversation
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ |
📌 Commit b3fbfe4 has been approved by |
@@ -444,8 +444,9 @@ impl<'a> Arguments<'a> { | |||
/// assert_eq!(format_args!("{}", 1).as_str(), None); | |||
/// ``` | |||
#[stable(feature = "fmt_as_str", since = "1.52.0")] | |||
#[rustc_const_unstable(feature = "const_arguments_as_str", issue = "none")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a tracking issue. issue = "none"
usually means that this will never be stable.
☀️ Test successful - checks-actions |
Motivation: mostly to move "panic!() in const contexts" forward, making use of
as_str
was mentioned in #85194 (comment) and seems like the simplest way forward.