-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
153b173
commit 38ba92f
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This had an ICE, see issue #89960 | ||
|
||
#![feature(let_else)] | ||
#![deny(unused_variables)] | ||
|
||
fn main() { | ||
let Some(ref mut meow) = Some(()) else { return }; | ||
//~^ ERROR unused variable: `meow` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: unused variable: `meow` | ||
--> $DIR/issue-89960.rs:7:22 | ||
| | ||
LL | let Some(ref mut meow) = Some(()) else { return }; | ||
| ^^^^ help: if this is intentional, prefix it with an underscore: `_meow` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/issue-89960.rs:4:9 | ||
| | ||
LL | #![deny(unused_variables)] | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|