2021-09-26 13:48:56 -05:00
|
|
|
// edition:2021
|
2021-09-26 15:17:08 -05:00
|
|
|
// run-pass
|
2021-09-26 13:48:56 -05:00
|
|
|
#![feature(if_let_guard)]
|
2021-09-26 15:17:08 -05:00
|
|
|
#[allow(unused_must_use)]
|
|
|
|
#[allow(dead_code)]
|
2021-09-26 13:48:56 -05:00
|
|
|
|
|
|
|
fn print_error_count(registry: &Registry) {
|
|
|
|
|x: &Registry| {
|
|
|
|
match &x {
|
|
|
|
Registry if let _ = registry.try_find_description() => { }
|
|
|
|
//~^ WARNING: irrefutable `if let` guard pattern
|
|
|
|
_ => {}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Registry;
|
|
|
|
impl Registry {
|
|
|
|
pub fn try_find_description(&self) {
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|