mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 08:36:03 +00:00
13 lines
300 B
Rust
13 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;
|
|
}
|
|
}
|