about summary refs log tree commit diff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2025-03-16 06:14:36 +0100
committerest31 <MTest31@outlook.com>2025-04-18 15:57:29 +0200
commit162daaa2fa9e78dad0219eb995a7903d778f7801 (patch)
tree0decabde875898d3a029e064d28aa873a661a9fd
parentd75f8cde2f54daa18f9b68e1b221e2d412855086 (diff)
downloadrust-162daaa2fa9e78dad0219eb995a7903d778f7801.tar.gz
rust-162daaa2fa9e78dad0219eb995a7903d778f7801.zip
Remove let_chains feature gate from even more tests
-rw-r--r--tests/mir-opt/building/logical_or_in_conditional.rs2
-rw-r--r--tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir34
-rw-r--r--tests/ui/deriving/auxiliary/malicious-macro.rs2
-rw-r--r--tests/ui/drop/drop-order-comparisons.e2021.fixed2
-rw-r--r--tests/ui/drop/drop-order-comparisons.rs2
-rw-r--r--tests/ui/lint/issue-121070-let-range.rs2
-rw-r--r--tests/ui/mir/issue-99852.rs2
-rw-r--r--tests/ui/parser/brace-in-let-chain.rs2
-rw-r--r--tests/ui/parser/deli-ident-issue-1.rs2
-rw-r--r--tests/ui/parser/issues/issue-103381.fixed2
-rw-r--r--tests/ui/parser/issues/issue-103381.rs2
-rw-r--r--tests/ui/parser/semi-in-let-chain.rs3
-rw-r--r--tests/ui/parser/semi-in-let-chain.stderr12
-rw-r--r--tests/ui/rfcs/rfc-0000-never_patterns/diverges-not.rs2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs5
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr100
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.rs1
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/parens.rs2
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs2
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs2
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/ast-validate-guards.rs2
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.rs2
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs3
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs3
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.rs1
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr12
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs3
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs1
30 files changed, 75 insertions, 139 deletions
diff --git a/tests/mir-opt/building/logical_or_in_conditional.rs b/tests/mir-opt/building/logical_or_in_conditional.rs
index e6872e6f2ec..249ccf72804 100644
--- a/tests/mir-opt/building/logical_or_in_conditional.rs
+++ b/tests/mir-opt/building/logical_or_in_conditional.rs
@@ -1,6 +1,6 @@
 // skip-filecheck
 //@ compile-flags: -Z validate-mir
-#![feature(let_chains)]
+//@ edition: 2024
 struct Droppy(u8);
 impl Drop for Droppy {
     fn drop(&mut self) {
diff --git a/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir b/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
index 72bd4605b26..327b3b618a0 100644
--- a/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
+++ b/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
@@ -19,7 +19,7 @@ fn test_complex() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = E::f() -> [return: bb1, unwind: bb34];
+        _2 = E::f() -> [return: bb1, unwind: bb35];
     }
 
     bb1: {
@@ -42,7 +42,7 @@ fn test_complex() -> () {
 
     bb5: {
         StorageLive(_4);
-        _4 = always_true() -> [return: bb6, unwind: bb34];
+        _4 = always_true() -> [return: bb6, unwind: bb35];
     }
 
     bb6: {
@@ -64,7 +64,7 @@ fn test_complex() -> () {
     }
 
     bb9: {
-        drop(_7) -> [return: bb11, unwind: bb34];
+        drop(_7) -> [return: bb11, unwind: bb35];
     }
 
     bb10: {
@@ -78,7 +78,7 @@ fn test_complex() -> () {
     }
 
     bb12: {
-        drop(_7) -> [return: bb13, unwind: bb34];
+        drop(_7) -> [return: bb13, unwind: bb35];
     }
 
     bb13: {
@@ -98,7 +98,7 @@ fn test_complex() -> () {
     }
 
     bb15: {
-        drop(_10) -> [return: bb17, unwind: bb34];
+        drop(_10) -> [return: bb17, unwind: bb35];
     }
 
     bb16: {
@@ -113,11 +113,12 @@ fn test_complex() -> () {
 
     bb18: {
         _1 = const ();
+        StorageDead(_2);
         goto -> bb22;
     }
 
     bb19: {
-        drop(_10) -> [return: bb20, unwind: bb34];
+        drop(_10) -> [return: bb20, unwind: bb35];
     }
 
     bb20: {
@@ -127,6 +128,7 @@ fn test_complex() -> () {
     }
 
     bb21: {
+        StorageDead(_2);
         _1 = const ();
         goto -> bb22;
     }
@@ -135,10 +137,9 @@ fn test_complex() -> () {
         StorageDead(_8);
         StorageDead(_5);
         StorageDead(_4);
-        StorageDead(_2);
         StorageDead(_1);
         StorageLive(_11);
-        _11 = always_true() -> [return: bb23, unwind: bb34];
+        _11 = always_true() -> [return: bb23, unwind: bb35];
     }
 
     bb23: {
@@ -146,7 +147,7 @@ fn test_complex() -> () {
     }
 
     bb24: {
-        goto -> bb32;
+        goto -> bb33;
     }
 
     bb25: {
@@ -155,7 +156,7 @@ fn test_complex() -> () {
 
     bb26: {
         StorageLive(_12);
-        _12 = E::f() -> [return: bb27, unwind: bb34];
+        _12 = E::f() -> [return: bb27, unwind: bb35];
     }
 
     bb27: {
@@ -178,21 +179,26 @@ fn test_complex() -> () {
 
     bb31: {
         _0 = const ();
-        goto -> bb33;
+        StorageDead(_12);
+        goto -> bb34;
     }
 
     bb32: {
-        _0 = const ();
+        StorageDead(_12);
         goto -> bb33;
     }
 
     bb33: {
+        _0 = const ();
+        goto -> bb34;
+    }
+
+    bb34: {
         StorageDead(_11);
-        StorageDead(_12);
         return;
     }
 
-    bb34 (cleanup): {
+    bb35 (cleanup): {
         resume;
     }
 }
diff --git a/tests/ui/deriving/auxiliary/malicious-macro.rs b/tests/ui/deriving/auxiliary/malicious-macro.rs
index 6665b40a14f..c551b3f927c 100644
--- a/tests/ui/deriving/auxiliary/malicious-macro.rs
+++ b/tests/ui/deriving/auxiliary/malicious-macro.rs
@@ -1,4 +1,4 @@
-#![feature(let_chains)]
+//@ edition: 2024
 
 extern crate proc_macro;
 
diff --git a/tests/ui/drop/drop-order-comparisons.e2021.fixed b/tests/ui/drop/drop-order-comparisons.e2021.fixed
index 78cf421cfbf..71158cb8062 100644
--- a/tests/ui/drop/drop-order-comparisons.e2021.fixed
+++ b/tests/ui/drop/drop-order-comparisons.e2021.fixed
@@ -24,7 +24,7 @@
 //@ [e2024] edition: 2024
 //@ run-pass
 
-#![feature(let_chains)]
+#![cfg_attr(e2021, feature(let_chains))]
 #![cfg_attr(e2021, warn(rust_2024_compatibility))]
 
 fn t_bindings() {
diff --git a/tests/ui/drop/drop-order-comparisons.rs b/tests/ui/drop/drop-order-comparisons.rs
index 78c75a9449f..0492b3a4db7 100644
--- a/tests/ui/drop/drop-order-comparisons.rs
+++ b/tests/ui/drop/drop-order-comparisons.rs
@@ -24,7 +24,7 @@
 //@ [e2024] edition: 2024
 //@ run-pass
 
-#![feature(let_chains)]
+#![cfg_attr(e2021, feature(let_chains))]
 #![cfg_attr(e2021, warn(rust_2024_compatibility))]
 
 fn t_bindings() {
diff --git a/tests/ui/lint/issue-121070-let-range.rs b/tests/ui/lint/issue-121070-let-range.rs
index 1f575cfaca5..82878587f8d 100644
--- a/tests/ui/lint/issue-121070-let-range.rs
+++ b/tests/ui/lint/issue-121070-let-range.rs
@@ -1,6 +1,6 @@
 //@ check-pass
+//@ edition:2024
 
-#![feature(let_chains)]
 #![allow(irrefutable_let_patterns)]
 fn main() {
     let _a = 0..1;
diff --git a/tests/ui/mir/issue-99852.rs b/tests/ui/mir/issue-99852.rs
index 59459c67228..af754cf8546 100644
--- a/tests/ui/mir/issue-99852.rs
+++ b/tests/ui/mir/issue-99852.rs
@@ -1,6 +1,6 @@
 //@ check-pass
 //@ compile-flags: -Z validate-mir
-#![feature(let_chains)]
+//@ edition: 2024
 
 fn lambda<T, U>() -> U
 where
diff --git a/tests/ui/parser/brace-in-let-chain.rs b/tests/ui/parser/brace-in-let-chain.rs
index 2009bc88d9e..25586441c18 100644
--- a/tests/ui/parser/brace-in-let-chain.rs
+++ b/tests/ui/parser/brace-in-let-chain.rs
@@ -1,6 +1,6 @@
 // issue #117766
+//@ edition: 2024
 
-#![feature(let_chains)]
 fn main() {
     if let () = ()
         && let () = () {
diff --git a/tests/ui/parser/deli-ident-issue-1.rs b/tests/ui/parser/deli-ident-issue-1.rs
index 224ee6c09e0..b7e7df1f860 100644
--- a/tests/ui/parser/deli-ident-issue-1.rs
+++ b/tests/ui/parser/deli-ident-issue-1.rs
@@ -1,4 +1,4 @@
-#![feature(let_chains)]
+//@ edition: 2024
 trait Demo {}
 
 impl dyn Demo {
diff --git a/tests/ui/parser/issues/issue-103381.fixed b/tests/ui/parser/issues/issue-103381.fixed
index 87c308789a1..955b246b863 100644
--- a/tests/ui/parser/issues/issue-103381.fixed
+++ b/tests/ui/parser/issues/issue-103381.fixed
@@ -1,6 +1,6 @@
+//@ edition: 2024
 //@ run-rustfix
 
-#![feature(let_chains)]
 #![allow(unused_variables)]
 #![allow(dead_code)]
 #![allow(irrefutable_let_patterns)]
diff --git a/tests/ui/parser/issues/issue-103381.rs b/tests/ui/parser/issues/issue-103381.rs
index ccbc40e5d02..d4b06b9c770 100644
--- a/tests/ui/parser/issues/issue-103381.rs
+++ b/tests/ui/parser/issues/issue-103381.rs
@@ -1,6 +1,6 @@
+//@ edition: 2024
 //@ run-rustfix
 
-#![feature(let_chains)]
 #![allow(unused_variables)]
 #![allow(dead_code)]
 #![allow(irrefutable_let_patterns)]
diff --git a/tests/ui/parser/semi-in-let-chain.rs b/tests/ui/parser/semi-in-let-chain.rs
index 9c21af0372d..522b90ea250 100644
--- a/tests/ui/parser/semi-in-let-chain.rs
+++ b/tests/ui/parser/semi-in-let-chain.rs
@@ -1,6 +1,5 @@
 // Issue #117720
-
-#![feature(let_chains)]
+//@ edition: 2024
 
 fn main() {
     if let () = ()
diff --git a/tests/ui/parser/semi-in-let-chain.stderr b/tests/ui/parser/semi-in-let-chain.stderr
index c1a8f92965e..f36d5e041e5 100644
--- a/tests/ui/parser/semi-in-let-chain.stderr
+++ b/tests/ui/parser/semi-in-let-chain.stderr
@@ -1,11 +1,11 @@
 error: expected `{`, found `;`
-  --> $DIR/semi-in-let-chain.rs:7:23
+  --> $DIR/semi-in-let-chain.rs:6:23
    |
 LL |         && let () = ();
    |                       ^ expected `{`
    |
 note: you likely meant to continue parsing the let-chain starting here
-  --> $DIR/semi-in-let-chain.rs:8:9
+  --> $DIR/semi-in-let-chain.rs:7:9
    |
 LL |         && let () = ()
    |         ^^^^^^
@@ -16,13 +16,13 @@ LL +         && let () = ()
    |
 
 error: expected `{`, found `;`
-  --> $DIR/semi-in-let-chain.rs:15:20
+  --> $DIR/semi-in-let-chain.rs:14:20
    |
 LL |         && () == ();
    |                    ^ expected `{`
    |
 note: the `if` expression is missing a block after this condition
-  --> $DIR/semi-in-let-chain.rs:14:8
+  --> $DIR/semi-in-let-chain.rs:13:8
    |
 LL |       if let () = ()
    |  ________^
@@ -30,13 +30,13 @@ LL | |         && () == ();
    | |___________________^
 
 error: expected `{`, found `;`
-  --> $DIR/semi-in-let-chain.rs:23:20
+  --> $DIR/semi-in-let-chain.rs:22:20
    |
 LL |         && () == ();
    |                    ^ expected `{`
    |
 note: you likely meant to continue parsing the let-chain starting here
-  --> $DIR/semi-in-let-chain.rs:24:9
+  --> $DIR/semi-in-let-chain.rs:23:9
    |
 LL |         && let () = ()
    |         ^^^^^^
diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/diverges-not.rs b/tests/ui/rfcs/rfc-0000-never_patterns/diverges-not.rs
index 6b85ada3aad..60e5452edb3 100644
--- a/tests/ui/rfcs/rfc-0000-never_patterns/diverges-not.rs
+++ b/tests/ui/rfcs/rfc-0000-never_patterns/diverges-not.rs
@@ -1,5 +1,5 @@
+//@ edition: 2024
 #![feature(never_patterns)]
-#![feature(let_chains)]
 #![allow(incomplete_features)]
 #![deny(unreachable_patterns)]
 
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs
index 983fe87451f..b1e305834cb 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs
@@ -15,11 +15,9 @@ fn _if_let_guard() {
 
         () if true && let 0 = 1 => {}
         //~^ ERROR `if let` guards are experimental
-        //~| ERROR `let` expressions in this position are unstable
 
         () if let 0 = 1 && true => {}
         //~^ ERROR `if let` guards are experimental
-        //~| ERROR `let` expressions in this position are unstable
 
         () if (let 0 = 1) && true => {}
         //~^ ERROR expected expression, found `let` statement
@@ -33,8 +31,6 @@ fn _if_let_guard() {
 
         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
         //~^ ERROR `if let` guards are experimental
-        //~| ERROR `let` expressions in this position are unstable
-        //~| ERROR `let` expressions in this position are unstable
         //~| ERROR expected expression, found `let` statement
         //~| ERROR expected expression, found `let` statement
         //~| ERROR expected expression, found `let` statement
@@ -42,7 +38,6 @@ fn _if_let_guard() {
 
         () if let Range { start: _, end: _ } = (true..true) && false => {}
         //~^ ERROR `if let` guards are experimental
-        //~| ERROR `let` expressions in this position are unstable
 
         _ => {}
     }
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
index 0997f0c81a0..19d1f4b0a57 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
@@ -25,98 +25,98 @@ LL |         () if (((let 0 = 1))) => {}
    |                  ^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:24:16
+  --> $DIR/feature-gate.rs:22:16
    |
 LL |         () if (let 0 = 1) && true => {}
    |                ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:24:16
+  --> $DIR/feature-gate.rs:22:16
    |
 LL |         () if (let 0 = 1) && true => {}
    |                ^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:27:24
+  --> $DIR/feature-gate.rs:25:24
    |
 LL |         () if true && (let 0 = 1) => {}
    |                        ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:27:24
+  --> $DIR/feature-gate.rs:25:24
    |
 LL |         () if true && (let 0 = 1) => {}
    |                        ^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:30:16
+  --> $DIR/feature-gate.rs:28:16
    |
 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
    |                ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:30:16
+  --> $DIR/feature-gate.rs:28:16
    |
 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
    |                ^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:30:31
+  --> $DIR/feature-gate.rs:28:31
    |
 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
    |                               ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:30:31
+  --> $DIR/feature-gate.rs:28:31
    |
 LL |         () if (let 0 = 1) && (let 0 = 1) => {}
    |                               ^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:34:42
+  --> $DIR/feature-gate.rs:32:42
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |                                          ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:34:42
+  --> $DIR/feature-gate.rs:32:42
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:34:55
+  --> $DIR/feature-gate.rs:32:55
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |                                                       ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:34:42
+  --> $DIR/feature-gate.rs:32:42
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:34:68
+  --> $DIR/feature-gate.rs:32:68
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |                                                                    ^^^^^^^^^
    |
    = note: only supported directly in conditions of `if` and `while` expressions
 note: `let`s wrapped in parentheses are not supported in a context with let chains
-  --> $DIR/feature-gate.rs:34:42
+  --> $DIR/feature-gate.rs:32:42
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:60:16
+  --> $DIR/feature-gate.rs:55:16
    |
 LL |     use_expr!((let 0 = 1 && 0 == 0));
    |                ^^^
@@ -124,7 +124,7 @@ LL |     use_expr!((let 0 = 1 && 0 == 0));
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:60:16
+  --> $DIR/feature-gate.rs:55:16
    |
 LL |     use_expr!((let 0 = 1 && 0 == 0));
    |                ^^^
@@ -133,7 +133,7 @@ LL |     use_expr!((let 0 = 1 && 0 == 0));
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:63:16
+  --> $DIR/feature-gate.rs:58:16
    |
 LL |     use_expr!((let 0 = 1));
    |                ^^^
@@ -141,7 +141,7 @@ LL |     use_expr!((let 0 = 1));
    = note: only supported directly in conditions of `if` and `while` expressions
 
 error: expected expression, found `let` statement
-  --> $DIR/feature-gate.rs:63:16
+  --> $DIR/feature-gate.rs:58:16
    |
 LL |     use_expr!((let 0 = 1));
    |                ^^^
@@ -150,7 +150,7 @@ LL |     use_expr!((let 0 = 1));
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: no rules expected keyword `let`
-  --> $DIR/feature-gate.rs:72:15
+  --> $DIR/feature-gate.rs:67:15
    |
 LL |     macro_rules! use_expr {
    |     --------------------- when calling this macro
@@ -159,7 +159,7 @@ LL |     use_expr!(let 0 = 1);
    |               ^^^ no rules expected this token in macro call
    |
 note: while trying to match meta-variable `$e:expr`
-  --> $DIR/feature-gate.rs:53:10
+  --> $DIR/feature-gate.rs:48:10
    |
 LL |         ($e:expr) => {
    |          ^^^^^^^
@@ -187,7 +187,7 @@ LL |         () if true && let 0 = 1 => {}
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
 error[E0658]: `if let` guards are experimental
-  --> $DIR/feature-gate.rs:20:12
+  --> $DIR/feature-gate.rs:19:12
    |
 LL |         () if let 0 = 1 && true => {}
    |            ^^^^^^^^^^^^^^^^^^^^
@@ -198,7 +198,7 @@ LL |         () if let 0 = 1 && true => {}
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
 error[E0658]: `if let` guards are experimental
-  --> $DIR/feature-gate.rs:34:12
+  --> $DIR/feature-gate.rs:32:12
    |
 LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -209,7 +209,7 @@ LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 =
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
 error[E0658]: `if let` guards are experimental
-  --> $DIR/feature-gate.rs:43:12
+  --> $DIR/feature-gate.rs:39:12
    |
 LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -220,7 +220,7 @@ LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
 error[E0658]: `if let` guards are experimental
-  --> $DIR/feature-gate.rs:68:12
+  --> $DIR/feature-gate.rs:63:12
    |
 LL |         () if let 0 = 1 => {}
    |            ^^^^^^^^^^^^
@@ -230,56 +230,6 @@ LL |         () if let 0 = 1 => {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
-error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/feature-gate.rs:16:23
-   |
-LL |         () if true && let 0 = 1 => {}
-   |                       ^^^^^^^^^
-   |
-   = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
-   = help: add `#![feature(let_chains)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/feature-gate.rs:20:15
-   |
-LL |         () if let 0 = 1 && true => {}
-   |               ^^^^^^^^^
-   |
-   = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
-   = help: add `#![feature(let_chains)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/feature-gate.rs:34:15
-   |
-LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
-   |               ^^^^^^^^^
-   |
-   = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
-   = help: add `#![feature(let_chains)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/feature-gate.rs:34:28
-   |
-LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
-   |                            ^^^^^^^^^
-   |
-   = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
-   = help: add `#![feature(let_chains)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/feature-gate.rs:43:15
-   |
-LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
-   = help: add `#![feature(let_chains)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 25 previous errors
+error: aborting due to 20 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.rs
index 423a2cd53fc..e1138835006 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.rs
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.rs
@@ -1,7 +1,6 @@
 // Expression macros can't expand to a let match guard.
 
 #![feature(if_let_guard)]
-#![feature(let_chains)]
 
 macro_rules! m {
     ($e:expr) => { let Some(x) = $e }
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr
index b8065b9f556..921cd083fff 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/macro-expanded.stderr
@@ -1,5 +1,5 @@
 error: expected expression, found `let` statement
-  --> $DIR/macro-expanded.rs:7:20
+  --> $DIR/macro-expanded.rs:6:20
    |
 LL |     ($e:expr) => { let Some(x) = $e }
    |                    ^^^
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs
index 47653efffb7..29f529a30c2 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.rs
@@ -1,5 +1,5 @@
+//@ edition: 2024
 #![feature(if_let_guard)]
-#![feature(let_chains)]
 #![allow(irrefutable_let_patterns)]
 
 fn same_pattern(c: bool) {
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/parens.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/parens.rs
index 0e71a9d24c9..a4cb73c6508 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/parens.rs
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/parens.rs
@@ -1,7 +1,7 @@
+//@ edition: 2024
 // Parenthesised let "expressions" are not allowed in guards
 
 #![feature(if_let_guard)]
-#![feature(let_chains)]
 
 #[cfg(false)]
 fn un_cfged() {
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs b/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs
index 32a223c9159..e7946a2a23b 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs
@@ -1,8 +1,8 @@
 // Check shadowing in if let guards works as expected.
 //@ check-pass
+//@ edition: 2024
 
 #![feature(if_let_guard)]
-#![feature(let_chains)]
 
 fn main() {
     let x: Option<Option<i32>> = Some(Some(6));
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs
index e1edde6de19..dc052c38fe7 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-lowering-does-not-wrap-let-chains.rs
@@ -1,6 +1,6 @@
 //@ run-pass
+//@ edition: 2024
 
-#![feature(let_chains)]
 #![allow(irrefutable_let_patterns)]
 
 fn main() {
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-validate-guards.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-validate-guards.rs
index cb3be59bee0..ae13f7c76ba 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-validate-guards.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-validate-guards.rs
@@ -1,4 +1,4 @@
-#![feature(let_chains)]
+//@ edition: 2024
 
 fn let_or_guard(x: Result<Option<i32>, ()>) {
     match x {
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.rs
index 3c572054e3f..8e7db9a430c 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ensure-that-let-else-does-not-interact-with-let-chains.rs
@@ -1,4 +1,4 @@
-#![feature(let_chains)]
+//@ edition: 2024
 
 fn main() {
     let opt = Some(1i32);
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs
index 59c81d053bc..0113a87cecc 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-90722.rs
@@ -1,6 +1,5 @@
 //@ check-pass
-
-#![feature(let_chains)]
+//@ edition: 2024
 
 fn main() {
     let x = Some(vec!["test"]);
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs
index ea4b34eacba..f5d87d6999a 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-92145.rs
@@ -1,6 +1,5 @@
 //@ check-pass
-
-#![feature(let_chains)]
+//@ edition:2024
 
 fn main() {
     let opt = Some("foo bar");
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.rs
index f90b9ab0d40..f6de37867d8 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.rs
@@ -2,7 +2,6 @@ fn main() {
     match true {
         _ if let true = true && true => {}
         //~^ ERROR `if let` guards are
-        //~| ERROR `let` expressions in this
         _ => {}
     }
 }
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr
index 637ae4915ed..17fa37d2df3 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr
@@ -9,16 +9,6 @@ LL |         _ if let true = true && true => {}
    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
    = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
 
-error[E0658]: `let` expressions in this position are unstable
-  --> $DIR/issue-93150.rs:3:14
-   |
-LL |         _ if let true = true && true => {}
-   |              ^^^^^^^^^^^^^^^
-   |
-   = note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
-   = help: add `#![feature(let_chains)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs
index 77756d0bee0..7589b33a73c 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-99938.rs
@@ -1,6 +1,7 @@
 //@ compile-flags: -Zvalidate-mir -C opt-level=3
 //@ build-pass
-#![feature(let_chains)]
+//@ edition: 2024
+
 struct TupleIter<T, I: Iterator<Item = T>> {
     inner: I,
 }
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs
index 2c7fe2eea33..7d8dfe37135 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs
@@ -3,7 +3,6 @@
 //@ edition: 2024
 //@ check-pass
 
-#![feature(let_chains)]
 #![allow(irrefutable_let_patterns)]
 
 struct Pd;