2024-03-30 12:57:54 -05:00
|
|
|
#![allow(incomplete_features)]
|
2024-04-02 10:54:29 -05:00
|
|
|
#![feature(ref_pat_everywhere)]
|
2024-03-30 12:57:54 -05:00
|
|
|
pub fn main() {
|
|
|
|
if let Some(&x) = Some(0) {
|
|
|
|
//~^ ERROR: mismatched types [E0308]
|
|
|
|
let _: u32 = x;
|
|
|
|
}
|
|
|
|
if let &Some(x) = &mut Some(0) {
|
|
|
|
//~^ ERROR: mismatched types [E0308]
|
|
|
|
let _: u32 = x;
|
|
|
|
}
|
2024-04-02 10:54:29 -05:00
|
|
|
if let Some(&x) = &mut Some(0) {
|
|
|
|
//~^ ERROR: mismatched types [E0308]
|
|
|
|
let _: u32 = x;
|
|
|
|
}
|
2024-03-30 12:57:54 -05:00
|
|
|
}
|