Skip to content

Remove #![feature(let_chains)] from library and src/librustdoc #140966

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

est31
Copy link
Member

@est31 est31 commented May 13, 2025

PR #132833 has stabilized the let_chains feature. This PR removes the last occurences from the library, the compiler, and librustdoc (also because #140887 missed the conditional in one of the crates as it was behind the "rustc" feature).

We keep core as exercise for the future as updating it is non-trivial (see PR thread).

@rustbot
Copy link
Collaborator

rustbot commented May 13, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2025

Some changes occurred in exhaustiveness checking

cc @Nadrieril

@rust-log-analyzer

This comment has been minimized.

@samueltardieu
Copy link
Contributor

"--edition" "2021"

It looks like the tests/run-make tests have not been updated to use edition 2024.

@est31 est31 force-pushed the let_chains_library branch from 46001c1 to 79b2794 Compare May 13, 2025 22:22
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label May 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 13, 2025

This PR modifies run-make tests.

cc @jieyouxu

@est31
Copy link
Member Author

est31 commented May 14, 2025

Updated that test to edition 2024

@tgross35
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 14, 2025

📌 Commit 79b2794 has been approved by tgross35

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 14, 2025

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 May 14, 2025
@tgross35 tgross35 assigned tgross35 and unassigned jhpratt May 15, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 15, 2025
Remove #![feature(let_chains)] from library and src/librustdoc

PR rust-lang#132833 has stabilized the `let_chains` feature. This PR removes the last occurences from the library, the compiler, and librustdoc (also because rust-lang#140887 missed the conditional in one of the crates as it was behind the "rustc" feature).
compiler-errors added a commit to compiler-errors/rust that referenced this pull request May 15, 2025
Remove #![feature(let_chains)] from library and src/librustdoc

PR rust-lang#132833 has stabilized the `let_chains` feature. This PR removes the last occurences from the library, the compiler, and librustdoc (also because rust-lang#140887 missed the conditional in one of the crates as it was behind the "rustc" feature).
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…mpiler-errors

Rollup of 14 pull requests

Successful merges:

 - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary")
 - rust-lang#140130 (Add LLDB providers for BTreeMap and BTreeSet)
 - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`)
 - rust-lang#140712 (normalization: avoid incompletely constraining GAT args)
 - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output)
 - rust-lang#140834 (move (or remove) some impl Trait tests)
 - rust-lang#140910 (Remove `stable` attribute from wasi fs (read_exact|write_all)_at)
 - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`)
 - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc)
 - rust-lang#140977 ([win] Use a dash instead of slash for linker to avoid breaking lld)
 - rust-lang#140990 (VxWorks: updates from recent libc versions)
 - rust-lang#141003 (Improve ternary operator recovery)
 - rust-lang#141013 (Implement methods to set STARTUPINFO flags for Command API on Windows)
 - rust-lang#141026 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#139749 (docs(library/core/src/pin): fix typo "necessarily" -> "necessary")
 - rust-lang#140685 (Simplify `Vec::as_non_null` implementation and make it `const`)
 - rust-lang#140712 (normalization: avoid incompletely constraining GAT args)
 - rust-lang#140768 (Improve `dangerous_implicit_aurorefs` diagnostic output)
 - rust-lang#140947 (Flush errors before deep normalize in `dropck_outlives`)
 - rust-lang#140966 (Remove #![feature(let_chains)] from library and src/librustdoc)
 - rust-lang#140990 (VxWorks: updates from recent libc versions)
 - rust-lang#141027 (remove `RustfmtState` to reduce `initial_rustfmt` complexity)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#141040 (comment)

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 15, 2025
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 15, 2025
@est31
Copy link
Member Author

est31 commented May 16, 2025

I guess that build failure makes sense: rust-for-linux compiles the core crate under edition 2021 just like all other crates that it compiles.

One can't switch that to edition 2024 directly, as the MSRV is 1.78, and we have edition 2024 since 1.85.0. And even if, there might be possible changes needed in some of the drivers in the Linux tree.

Maybe we can make it somehow detect the compiler version and choose the edition based on that. That would make sense, as different compiler versions expect different editions for their core crate: my change only makes core not compile on 2021 and earlier any more.

The alternative, of keeping #![feature(let_chains)] around until the MSRV increases by 5 versions, i.e. the equivalent of half a year, isn't very tempting. One can technically do the error msg improvement without the removal of the feature. But I prefer making the makefile smarter.

@est31 est31 force-pushed the let_chains_library branch from 79b2794 to 5013a97 Compare May 16, 2025 00:06
@est31
Copy link
Member Author

est31 commented May 16, 2025

I have removed core for now as it's non trivial, per above. Let's get the trivial removals done first.

r? @tgross35

@rustbot
Copy link
Collaborator

rustbot commented May 16, 2025

Requested reviewer is already assigned to this pull request.

Please choose another assignee.

@est31 est31 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants