blob: ef19c7cbde2ba4020d7fce27acf1cd1eab2e97e4 [file] [log] [blame]
#![feature(deref_patterns)]
#![allow(
incomplete_features,
clippy::eq_op,
clippy::op_ref,
clippy::deref_addrof,
clippy::borrow_deref_ref,
clippy::needless_if
)]
#![deny(clippy::single_match_else)]
fn string() {
match *"" {
//~^ single_match
"" => {},
_ => {},
}
match *&*&*&*"" {
//~^ single_match
"" => {},
_ => {},
}
match ***&&"" {
//~^ single_match
"" => {},
_ => {},
}
match *&*&*"" {
//~^ single_match
"" => {},
_ => {},
}
match **&&*"" {
//~^ single_match
"" => {},
_ => {},
}
}
fn int() {
match &&&1 {
&&&2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
match &&&1 {
&&2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
match &&1 {
&&2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
match &&&1 {
&2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
match &&1 {
&2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
match &&&1 {
2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
match &&1 {
2 => unreachable!(),
_ => {
// ok
},
}
//~^^^^^^ single_match_else
}