mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
14 lines
233 B
Rust
14 lines
233 B
Rust
//@ check-pass
|
|
|
|
|
|
|
|
fn main() {
|
|
let Some(n) = &mut &mut Some(5i32) else { return; };
|
|
*n += 1; // OK
|
|
let _ = n;
|
|
|
|
let Some(n): &mut Option<i32> = &mut &mut Some(5i32) else { return; };
|
|
*n += 1; // OK
|
|
let _ = n;
|
|
}
|