implement inherent str constructors#136517
Merged
bors merged 2 commits intorust-lang:masterfrom Feb 6, 2025
m4rch3n1ng:inherent-str-constructors
Merged
implement inherent str constructors#136517bors merged 2 commits intorust-lang:masterfrom m4rch3n1ng:inherent-str-constructors
bors merged 2 commits intorust-lang:masterfrom
m4rch3n1ng:inherent-str-constructors
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
implement #131114
this implements
i left
std::str::from_raw_partsandstd::str::from_raw_parts_mutout of this as those are unstable and were not mentioned by the tracking issue or the original pull request, but i can add those here as well.i was also unsure of what to do with the
rustc_const_(un)stableattributes: i removed the#[rustc_const_stable]attribute fromstr::from_utf8,str::from_utf8_uncheckedandstr::from_utf8_unchecked_mut, and left the#[rust_const_unstable]instr::from_utf8_mut(btw why is that one not const stable yet with #57349 merged?).is there a way to redirect users to the stable
std::str::from_utf8instead of only saying "hey this is unstable"?for now i just removed the check for
str::from_utf8in the test intests/ui/suggestions/suggest-std-when-using-type.rs.