mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
25 lines
548 B
Rust
25 lines
548 B
Rust
//@ run-pass
|
|
#![allow(incomplete_features)]
|
|
#![feature(ref_pat_everywhere)]
|
|
|
|
pub fn main() {
|
|
if let Some(Some(&x)) = &Some(&Some(0)) {
|
|
let _: u32 = x;
|
|
}
|
|
if let Some(&Some(x)) = &Some(Some(0)) {
|
|
let _: u32 = x;
|
|
}
|
|
if let Some(Some(&mut x)) = &mut Some(&mut Some(0)) {
|
|
let _: u32 = x;
|
|
}
|
|
if let Some(Some(&x)) = &Some(&mut Some(0)) {
|
|
let _: u32 = x;
|
|
}
|
|
if let &Some(x) = &mut Some(0) {
|
|
let _: u32 = x;
|
|
}
|
|
if let Some(&x) = &mut Some(0) {
|
|
let _: u32 = x;
|
|
}
|
|
}
|