constify (the unstable) str::as_str#145930
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 28, 2025
Merged
Conversation
Collaborator
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
Contributor
|
Confused how this could have possibly passed CI without a |
Contributor
Author
|
I think they got reworked a few months ago to inherit stability and feature name from the non-const attributes. |
Contributor
|
Right! Sorry, I was forgetting that this method is still unstable. Carry on, then. |
Member
|
@bors r+ rollup |
Collaborator
bors
added a commit
that referenced
this pull request
Aug 28, 2025
Rollup of 9 pull requests Successful merges: - #142727 (wasm: rm static mut) - #143193 (Port `#[link]` to the new attribute parsing infrastructure ) - #144864 (No source fixes) - #145913 (Add spin_loop hint for LoongArch) - #145926 (compiletest: Remove several remnants of the old libtest-based executor) - #145928 (Rename `Location::file_with_nul` to `file_as_c_str`) - #145930 (`const`ify (the unstable) `str::as_str`) - #145941 (Disable `integer_to_ptr_transmutes` suggestion for unsized types) - #145953 (Update `icu_list` to 2.0) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Aug 28, 2025
Rollup merge of #145930 - GrigorenkoPV:const_str_as_str, r=joshtriplett `const`ify (the unstable) `str::as_str` Tracking issue: #130366 The method was not initially marked `const` presumably because it is only useful with `Deref`. But now that const traits seem to be a thing that can actually become real, why not make it `const`? PR `const`ifying `Deref`: #145279
6 tasks
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Sep 9, 2025
…oshtriplett `const`ify (the unstable) `str::as_str` Tracking issue: rust-lang#130366 The method was not initially marked `const` presumably because it is only useful with `Deref`. But now that const traits seem to be a thing that can actually become real, why not make it `const`? PR `const`ifying `Deref`: rust-lang#145279
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Tracking issue: #130366
The method was not initially marked
constpresumably because it is only useful withDeref. But now that const traits seem to be a thing that can actually become real, why not make itconst?PR
constifyingDeref: #145279