mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
ddcfb94b84
The suggestion to use `let else` with an uninitialized refutable `let` statement was erroneous: `let else` cannot be used with deferred initialization.
9 lines
257 B
Rust
9 lines
257 B
Rust
// https://github.com/rust-lang/rust/issues/123844
|
|
// An uninitialized refutable let should not suggest `let else`, as it can't be used with deferred
|
|
// initialization.
|
|
|
|
fn main() {
|
|
let Some(x); //~ ERROR refutable pattern in local binding
|
|
x = 1;
|
|
}
|