Skip to content

Commit c373f03

Browse files
committed
Remove let_chains feature gate from even more tests
1 parent 1b29d01 commit c373f03

30 files changed

+75
-139
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/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir

+20-14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn test_complex() -> () {
1919
bb0: {
2020
StorageLive(_1);
2121
StorageLive(_2);
22-
_2 = E::f() -> [return: bb1, unwind: bb34];
22+
_2 = E::f() -> [return: bb1, unwind: bb35];
2323
}
2424

2525
bb1: {
@@ -42,7 +42,7 @@ fn test_complex() -> () {
4242

4343
bb5: {
4444
StorageLive(_4);
45-
_4 = always_true() -> [return: bb6, unwind: bb34];
45+
_4 = always_true() -> [return: bb6, unwind: bb35];
4646
}
4747

4848
bb6: {
@@ -64,7 +64,7 @@ fn test_complex() -> () {
6464
}
6565

6666
bb9: {
67-
drop(_7) -> [return: bb11, unwind: bb34];
67+
drop(_7) -> [return: bb11, unwind: bb35];
6868
}
6969

7070
bb10: {
@@ -78,7 +78,7 @@ fn test_complex() -> () {
7878
}
7979

8080
bb12: {
81-
drop(_7) -> [return: bb13, unwind: bb34];
81+
drop(_7) -> [return: bb13, unwind: bb35];
8282
}
8383

8484
bb13: {
@@ -98,7 +98,7 @@ fn test_complex() -> () {
9898
}
9999

100100
bb15: {
101-
drop(_10) -> [return: bb17, unwind: bb34];
101+
drop(_10) -> [return: bb17, unwind: bb35];
102102
}
103103

104104
bb16: {
@@ -113,11 +113,12 @@ fn test_complex() -> () {
113113

114114
bb18: {
115115
_1 = const ();
116+
StorageDead(_2);
116117
goto -> bb22;
117118
}
118119

119120
bb19: {
120-
drop(_10) -> [return: bb20, unwind: bb34];
121+
drop(_10) -> [return: bb20, unwind: bb35];
121122
}
122123

123124
bb20: {
@@ -127,6 +128,7 @@ fn test_complex() -> () {
127128
}
128129

129130
bb21: {
131+
StorageDead(_2);
130132
_1 = const ();
131133
goto -> bb22;
132134
}
@@ -135,18 +137,17 @@ fn test_complex() -> () {
135137
StorageDead(_8);
136138
StorageDead(_5);
137139
StorageDead(_4);
138-
StorageDead(_2);
139140
StorageDead(_1);
140141
StorageLive(_11);
141-
_11 = always_true() -> [return: bb23, unwind: bb34];
142+
_11 = always_true() -> [return: bb23, unwind: bb35];
142143
}
143144

144145
bb23: {
145146
switchInt(move _11) -> [0: bb25, otherwise: bb24];
146147
}
147148

148149
bb24: {
149-
goto -> bb32;
150+
goto -> bb33;
150151
}
151152

152153
bb25: {
@@ -155,7 +156,7 @@ fn test_complex() -> () {
155156

156157
bb26: {
157158
StorageLive(_12);
158-
_12 = E::f() -> [return: bb27, unwind: bb34];
159+
_12 = E::f() -> [return: bb27, unwind: bb35];
159160
}
160161

161162
bb27: {
@@ -178,21 +179,26 @@ fn test_complex() -> () {
178179

179180
bb31: {
180181
_0 = const ();
181-
goto -> bb33;
182+
StorageDead(_12);
183+
goto -> bb34;
182184
}
183185

184186
bb32: {
185-
_0 = const ();
187+
StorageDead(_12);
186188
goto -> bb33;
187189
}
188190

189191
bb33: {
192+
_0 = const ();
193+
goto -> bb34;
194+
}
195+
196+
bb34: {
190197
StorageDead(_11);
191-
StorageDead(_12);
192198
return;
193199
}
194200

195-
bb34 (cleanup): {
201+
bb35 (cleanup): {
196202
resume;
197203
}
198204
}

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)