(#102929) Implement String:leak#102941
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
@rustbot label +T-libs-api -T-libs |
library/alloc/src/string.rs
Outdated
| #[cfg(not(no_global_oom_handling))] | ||
| #[unstable(feature = "string_leak", issue = "102929")] | ||
| #[inline] | ||
| pub fn leak<'a>(self) -> &'a mut str { |
There was a problem hiding this comment.
Is there any reason to use a generic <'a> instead of just 'static here? I believe the only reason we use <'a> for Vec<T> is for situations where T: !'static.
| pub fn leak<'a>(self) -> &'a mut str { | |
| pub fn leak(self) -> &'static mut str { |
There was a problem hiding this comment.
Good idea; as I understand it, variance will still allow the 'static to be used for any 'a
There was a problem hiding this comment.
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
|
https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy you can squash commits. |
7c31130 to
687dd3d
Compare
|
In an attempt to undo the merge commit, I messed up git beyond my ability to repair it, so this PR is superseded by #103280 |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
…htriplett (rust-lang#102929) Implement `String::leak` (attempt 2) Implementation of `String::leak` (rust-lang#102929) ACP: rust-lang/libs-team#109 Supersedes rust-lang#102941 (see previous reviews there) `@rustbot` label +T-libs-api -T-libs
…htriplett (rust-lang#102929) Implement `String::leak` (attempt 2) Implementation of `String::leak` (rust-lang#102929) ACP: rust-lang/libs-team#109 Supersedes rust-lang#102941 (see previous reviews there) ``@rustbot`` label +T-libs-api -T-libs
…htriplett (rust-lang#102929) Implement `String::leak` (attempt 2) Implementation of `String::leak` (rust-lang#102929) ACP: rust-lang/libs-team#109 Supersedes rust-lang#102941 (see previous reviews there) ```@rustbot``` label +T-libs-api -T-libs


Implementation of
String::leak(#102929)ACP: rust-lang/libs-team#109
Superseded by: #103280