Skip to content

Commit 9c7ae38

Browse files
committed
Remove the let_else feature gate from the testsuite
Result of running: rg -l "feature.let_else" src/test/ | xargs sed -s -i "s#^...feature.let_else..\$##" Plus manual tidy fixes.
1 parent 173eb6f commit 9c7ae38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+62
-78
lines changed

src/test/ui/async-await/async-await-let-else.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// revisions: drop-tracking no-drop-tracking
33
// [drop-tracking] compile-flags: -Zdrop-tracking=yes
44
// [no-drop-tracking] compile-flags: -Zdrop-tracking=no
5-
#![feature(let_else)]
5+
66
use std::rc::Rc;
77

88
async fn foo(x: Option<bool>) {

src/test/ui/let-else/issue-100103.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// check-pass
33

44
#![feature(try_blocks)]
5-
#![feature(let_else)]
5+
66

77
fn main() {
88
let _: Result<i32, i32> = try {

src/test/ui/let-else/issue-94176.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Issue #94176: wrong span for the error message of a mismatched type error,
22
// if the function uses a `let else` construct.
3-
#![feature(let_else)]
3+
44

55
pub fn test(a: Option<u32>) -> Option<u32> { //~ ERROR mismatched types
66
let Some(_) = a else { return None; };

src/test/ui/let-else/issue-99975.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// run-pass
22
// compile-flags: -C opt-level=3 -Zvalidate-mir
33

4-
#![feature(let_else)]
4+
55

66
fn return_result() -> Option<String> {
77
Some("ok".to_string())

src/test/ui/let-else/let-else-allow-in-expr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(let_else)]
2-
31
#![deny(unused_variables)]
42

53
fn main() {

src/test/ui/let-else/let-else-allow-in-expr.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: unused variable: `x`
2-
--> $DIR/let-else-allow-in-expr.rs:7:13
2+
--> $DIR/let-else-allow-in-expr.rs:5:13
33
|
44
LL | let x = 1;
55
| ^ help: if this is intentional, prefix it with an underscore: `_x`
66
|
77
note: the lint level is defined here
8-
--> $DIR/let-else-allow-in-expr.rs:3:9
8+
--> $DIR/let-else-allow-in-expr.rs:1:9
99
|
1010
LL | #![deny(unused_variables)]
1111
| ^^^^^^^^^^^^^^^^
1212

1313
error: unused variable: `x`
14-
--> $DIR/let-else-allow-in-expr.rs:29:9
14+
--> $DIR/let-else-allow-in-expr.rs:27:9
1515
|
1616
LL | let x = 1;
1717
| ^ help: if this is intentional, prefix it with an underscore: `_x`

src/test/ui/let-else/let-else-allow-unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// issue #89807
22

3-
#![feature(let_else)]
3+
44

55
#[deny(unused_variables)]
66

src/test/ui/let-else/let-else-binding-explicit-mut-annotated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// from rfc2005 test suite
22

3-
#![feature(let_else)]
3+
44

55
// Verify the binding mode shifts - only when no `&` are auto-dereferenced is the
66
// final default binding mode mutable.

src/test/ui/let-else/let-else-binding-explicit-mut-borrow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#![feature(let_else)]
2-
31
// Slightly different from explicit-mut-annotated -- this won't show an error until borrowck.
42
// Should it show a type error instead?
53

4+
5+
66
fn main() {
77
let Some(n): &mut Option<i32> = &mut &Some(5i32) else {
88
//~^ ERROR cannot borrow data in a `&` reference as mutable

src/test/ui/let-else/let-else-binding-explicit-mut-pass.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22

3-
#![feature(let_else)]
3+
44

55
fn main() {
66
let Some(n) = &mut &mut Some(5i32) else { return; };

0 commit comments

Comments
 (0)