-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Tracking Issue for fmt::Arguments::as_str() #74442
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I don't quite understand fmt internals, but Make fmt::Arguments::as_str() return a 'static str. seems unnecessarily restrictive. And it breaks runtime-fmt which depends on hidden apis e.g. Arguments::new_v1 |
|
I'd like to be able to use this in the log crate to correctly implement a codegen optimization that doesn't really work otherwise: rust-lang/log#446 @rfcbot fcp merge |
Team member @sfackler has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This SGTM. One question though. Are we sure that the |
|
That's what I figured, but wanted to make sure it was explicitly addressed. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
Does this make any guarantees about when |
Currently it returns Some for |
Yeah, I see that from looking at the source code. I was more inquiring about whether it would be considered breaking to go from returning |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon. |
@jhpratt I think you'd generally want to use it as an optimization only, but we can probably guarantee that it will return Some for certain cases in particular (e.g. |
Stabilize Arguments::as_str Closes rust-lang#74442
Stabilize Arguments::as_str Closes rust-lang#74442
This function seems particularly bad for compressed formatting strings and breaks the otherwise clean abstraction. |
Tracking issue for
fmt::Arguments::as_str()
(#74056), gated by#![feature(fmt_as_str)]
.The text was updated successfully, but these errors were encountered: