Skip to content

Commit 2ba5942

Browse files
committed
Remove let_chains feature gate from even more tests
1 parent 5204067 commit 2ba5942

29 files changed

+53
-123
lines changed

tests/mir-opt/building/logical_or_in_conditional.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// skip-filecheck
22
//@ compile-flags: -Z validate-mir
3-
#![feature(let_chains)]
3+
//@ edition: 2024
44
struct Droppy(u8);
55
impl Drop for Droppy {
66
fn drop(&mut self) {

tests/ui/deriving/auxiliary/malicious-macro.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(let_chains)]
1+
//@ edition: 2024
22

33
extern crate proc_macro;
44

tests/ui/drop/drop-order-comparisons.e2021.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//@ [e2024] edition: 2024
2525
//@ run-pass
2626

27-
#![feature(let_chains)]
27+
#![cfg_attr(e2021, feature(let_chains))]
2828
#![cfg_attr(e2021, warn(rust_2024_compatibility))]
2929

3030
fn t_bindings() {

tests/ui/drop/drop-order-comparisons.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//@ [e2024] edition: 2024
2525
//@ run-pass
2626

27-
#![feature(let_chains)]
27+
#![cfg_attr(e2021, feature(let_chains))]
2828
#![cfg_attr(e2021, warn(rust_2024_compatibility))]
2929

3030
fn t_bindings() {

tests/ui/lint/issue-121070-let-range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ check-pass
2+
//@ edition:2024
23

3-
#![feature(let_chains)]
44
#![allow(irrefutable_let_patterns)]
55
fn main() {
66
let _a = 0..1;

tests/ui/mir/issue-99852.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ check-pass
22
//@ compile-flags: -Z validate-mir
3-
#![feature(let_chains)]
3+
//@ edition: 2024
44

55
fn lambda<T, U>() -> U
66
where

tests/ui/parser/brace-in-let-chain.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// issue #117766
2+
//@ edition: 2024
23

3-
#![feature(let_chains)]
44
fn main() {
55
if let () = ()
66
&& let () = () {

tests/ui/parser/deli-ident-issue-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(let_chains)]
1+
//@ edition: 2024
22
trait Demo {}
33

44
impl dyn Demo {

tests/ui/parser/issues/issue-103381.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
//@ edition: 2024
12
//@ run-rustfix
23

3-
#![feature(let_chains)]
44
#![allow(unused_variables)]
55
#![allow(dead_code)]
66
#![allow(irrefutable_let_patterns)]

tests/ui/parser/issues/issue-103381.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
//@ edition: 2024
12
//@ run-rustfix
23

3-
#![feature(let_chains)]
44
#![allow(unused_variables)]
55
#![allow(dead_code)]
66
#![allow(irrefutable_let_patterns)]

tests/ui/parser/semi-in-let-chain.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Issue #117720
2-
3-
#![feature(let_chains)]
2+
//@ edition: 2024
43

54
fn main() {
65
if let () = ()

tests/ui/parser/semi-in-let-chain.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: expected `{`, found `;`
2-
--> $DIR/semi-in-let-chain.rs:7:23
2+
--> $DIR/semi-in-let-chain.rs:6:23
33
|
44
LL | && let () = ();
55
| ^ expected `{`
66
|
77
note: you likely meant to continue parsing the let-chain starting here
8-
--> $DIR/semi-in-let-chain.rs:8:9
8+
--> $DIR/semi-in-let-chain.rs:7:9
99
|
1010
LL | && let () = ()
1111
| ^^^^^^
@@ -16,27 +16,27 @@ LL + && let () = ()
1616
|
1717

1818
error: expected `{`, found `;`
19-
--> $DIR/semi-in-let-chain.rs:15:20
19+
--> $DIR/semi-in-let-chain.rs:14:20
2020
|
2121
LL | && () == ();
2222
| ^ expected `{`
2323
|
2424
note: the `if` expression is missing a block after this condition
25-
--> $DIR/semi-in-let-chain.rs:14:8
25+
--> $DIR/semi-in-let-chain.rs:13:8
2626
|
2727
LL | if let () = ()
2828
| ________^
2929
LL | | && () == ();
3030
| |___________________^
3131

3232
error: expected `{`, found `;`
33-
--> $DIR/semi-in-let-chain.rs:23:20
33+
--> $DIR/semi-in-let-chain.rs:22:20
3434
|
3535
LL | && () == ();
3636
| ^ expected `{`
3737
|
3838
note: you likely meant to continue parsing the let-chain starting here
39-
--> $DIR/semi-in-let-chain.rs:24:9
39+
--> $DIR/semi-in-let-chain.rs:23:9
4040
|
4141
LL | && let () = ()
4242
| ^^^^^^

tests/ui/rfcs/rfc-0000-never_patterns/diverges-not.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
//@ edition: 2024
12
#![feature(never_patterns)]
2-
#![feature(let_chains)]
33
#![allow(incomplete_features)]
44
#![deny(unreachable_patterns)]
55

tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.rs

-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ fn _if_let_guard() {
1515

1616
() if true && let 0 = 1 => {}
1717
//~^ ERROR `if let` guards are experimental
18-
//~| ERROR `let` expressions in this position are unstable
1918

2019
() if let 0 = 1 && true => {}
2120
//~^ ERROR `if let` guards are experimental
22-
//~| ERROR `let` expressions in this position are unstable
2321

2422
() if (let 0 = 1) && true => {}
2523
//~^ ERROR expected expression, found `let` statement
@@ -33,16 +31,13 @@ fn _if_let_guard() {
3331

3432
() if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
3533
//~^ ERROR `if let` guards are experimental
36-
//~| ERROR `let` expressions in this position are unstable
37-
//~| ERROR `let` expressions in this position are unstable
3834
//~| ERROR expected expression, found `let` statement
3935
//~| ERROR expected expression, found `let` statement
4036
//~| ERROR expected expression, found `let` statement
4137

4238

4339
() if let Range { start: _, end: _ } = (true..true) && false => {}
4440
//~^ ERROR `if let` guards are experimental
45-
//~| ERROR `let` expressions in this position are unstable
4641

4742
_ => {}
4843
}

0 commit comments

Comments
 (0)