Auto merge of #143214 - camsteffen:remove-let-chains-feature, r=est31

Remove let_chains unstable feature

Per https://github.com/rust-lang/rust/issues/53667#issuecomment-3016742982 (but then I also noticed rust-lang/rust#140722)

This replaces the feature gate with a parser error that says let chains require 2024.

A lot of tests were using the unstable feature. I either added edition:2024 to the test or split out the parts that require 2024.
This commit is contained in:
bors
2025-07-02 17:18:47 +00:00
39 changed files with 1053 additions and 1194 deletions

View File

@@ -4117,7 +4117,7 @@ impl MutVisitor for CondChecker<'_> {
LetChainsPolicy::AlwaysAllowed => (),
LetChainsPolicy::EditionDependent { current_edition } => {
if !current_edition.at_least_rust_2024() || !span.at_least_rust_2024() {
self.parser.psess.gated_spans.gate(sym::let_chains, span);
self.parser.dcx().emit_err(errors::LetChainPre2024 { span });
}
}
}