Skip to content

Commit 38ba92f

Browse files
committed
add test for issue 89960
1 parent 153b173 commit 38ba92f

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This had an ICE, see issue #89960
2+
3+
#![feature(let_else)]
4+
#![deny(unused_variables)]
5+
6+
fn main() {
7+
let Some(ref mut meow) = Some(()) else { return };
8+
//~^ ERROR unused variable: `meow`
9+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: unused variable: `meow`
2+
--> $DIR/issue-89960.rs:7:22
3+
|
4+
LL | let Some(ref mut meow) = Some(()) else { return };
5+
| ^^^^ help: if this is intentional, prefix it with an underscore: `_meow`
6+
|
7+
note: the lint level is defined here
8+
--> $DIR/issue-89960.rs:4:9
9+
|
10+
LL | #![deny(unused_variables)]
11+
| ^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to previous error
14+

0 commit comments

Comments
 (0)