Skip to content
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

stabilize inherent_str_constructors #137277

Merged

Conversation

m4rch3n1ng
Copy link
Contributor

fcp done in #131114 (comment).

tracking issue: #131114
closes: #131114

@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2025

r? @estebank

rustbot has assigned @estebank.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 19, 2025
@m4rch3n1ng m4rch3n1ng force-pushed the stabilize-inherent-str-constructors branch from f7dde46 to 76a91bb Compare February 19, 2025 15:43
@slanterns
Copy link
Contributor

slanterns commented Feb 19, 2025

Should we reuse these previous const_stable feature gates? Being const-stabilized before being stabilized seems wired 🤔

@m4rch3n1ng
Copy link
Contributor Author

not sure how that usually works, but at least when moving things to core, the since for the stabilization also stays: see core::net::Ipv4Addr::is_loopback, where it says that it's usable since rust 1.7.0, but core::net::Ipv4Addr itself was only stabilized in 1.77.

@hanna-kruppe
Copy link
Contributor

I think that’s a limitation around re-exports (if the version on the item in core said when it was made available in core, then the re-export in std would also show that version). This isn’t relevant here, the new methods can and should show the right version for their (const-)stabilization. I don’t know if reusing the same issue causes problems for that.

@m4rch3n1ng
Copy link
Contributor Author

m4rch3n1ng commented Feb 19, 2025

ok, so i should change those versions all to "CURRENT_RUSTC_VERSION"? and which feature should i use, the inherent_str_constructors one or the one that is already there?

@tgross35
Copy link
Contributor

For the methods where the std::str version is already const stable, use inherent_str_constructors and CURRENT_RUSTC_VERSION for const stability. For anything that can't yet be const stable, make the const stability gate the same as the std::str version.

@tgross35
Copy link
Contributor

Looks like the test changes triggered compiler labels

r? tgross35

@rustbot rustbot assigned tgross35 and unassigned estebank Feb 19, 2025
@tgross35 tgross35 removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 19, 2025
@tgross35
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 19, 2025

📌 Commit b24f775 has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 19, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#135296 (interpret: adjust vtable validity check for higher-ranked types)
 - rust-lang#137106 (Add customized compare for Link in rustdoc)
 - rust-lang#137253 (Restrict `bevy_ecs` `ParamSet` hack)
 - rust-lang#137262 (Make fewer crates depend on `rustc_ast_ir`)
 - rust-lang#137263 (Register `USAGE_OF_TYPE_IR_INHERENT`, remove inherent usages)
 - rust-lang#137266 (MIR visitor tweaks)
 - rust-lang#137269 (Pattern Migration 2024: properly label `&` patterns whose subpatterns are from macro expansions)
 - rust-lang#137277 (stabilize `inherent_str_constructors`)
 - rust-lang#137281 (Tweak "expected ident" parse error to avoid talking about doc comments)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit be73ea8 into rust-lang:master Feb 20, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 20, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
Rollup merge of rust-lang#137277 - m4rch3n1ng:stabilize-inherent-str-constructors, r=tgross35

stabilize `inherent_str_constructors`

fcp done in rust-lang#131114 (comment).

tracking issue: rust-lang#131114
closes: rust-lang#131114
@m4rch3n1ng m4rch3n1ng deleted the stabilize-inherent-str-constructors branch February 20, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for inherent_str_constructors
7 participants