mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
a8b77cfe54
Adds an additional hint to failures where we encounter an else keyword while we're parsing an if-let block. This is likely that the user has accidentally mixed if-let and let...else together.
7 lines
140 B
Rust
7 lines
140 B
Rust
fn main() {
|
|
let x = Some(123);
|
|
if let Some(y) = x else { //~ ERROR this `if` expression is missing a block
|
|
return;
|
|
};
|
|
}
|