use std::sync::Arc;
fn main() {
let mut x = Arc::new(Some(1));
match x {
//~^ HELP consider dereferencing to access the inner value using the Deref trait
//~| HELP consider dereferencing to access the inner value using the Deref trait
Some(_) => {}
//~^ ERROR mismatched types
None => {}
//~^ ERROR mismatched types
}
match &x {
//~^ HELP consider dereferencing to access the inner value using the Deref trait
//~| HELP consider dereferencing to access the inner value using the Deref trait
Some(_) => {}
//~^ ERROR mismatched types
None => {}
//~^ ERROR mismatched types
}
let mut y = Box::new(Some(1));
match y {
//~^ HELP consider dereferencing to access the inner value using the Deref trait
//~| HELP consider dereferencing to access the inner value using the Deref trait
Some(_) => {}
//~^ ERROR mismatched types
None => {}
//~^ ERROR mismatched types
}
let mut z = Arc::new(Some(1));
match z as Arc