mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
300 B
Rust
12 lines
300 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(ref_pat_everywhere)]
|
|
pub fn main() {
|
|
if let Some(&x) = Some(0) {
|
|
//~^ ERROR: mismatched types [E0308]
|
|
let _: u32 = x;
|
|
}
|
|
if let Some(&mut x) = Some(&0) {
|
|
//~^ ERROR: mismatched types [E0308]
|
|
let _: u32 = x;
|
|
}
|
|
}
|