Fix collapsible_if false positive with attributes
This commit is contained in:
parent
1021327781
commit
39ba449c2a
5 changed files with 34 additions and 0 deletions
|
|
@ -65,4 +65,13 @@ fn main() {
|
|||
else {
|
||||
println!("!")
|
||||
}
|
||||
|
||||
if x == "hello" {
|
||||
print!("Hello ");
|
||||
} else {
|
||||
#[cfg(not(roflol))]
|
||||
if y == "world" {
|
||||
println!("world!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,4 +79,13 @@ fn main() {
|
|||
println!("!")
|
||||
}
|
||||
}
|
||||
|
||||
if x == "hello" {
|
||||
print!("Hello ");
|
||||
} else {
|
||||
#[cfg(not(roflol))]
|
||||
if y == "world" {
|
||||
println!("world!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,4 +138,11 @@ fn main() {
|
|||
|
||||
// Fix #5962
|
||||
if matches!(true, true) && matches!(true, true) {}
|
||||
|
||||
if true {
|
||||
#[cfg(not(teehee))]
|
||||
if true {
|
||||
println!("Hello world!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,4 +154,11 @@ fn main() {
|
|||
if matches!(true, true) {
|
||||
if matches!(true, true) {}
|
||||
}
|
||||
|
||||
if true {
|
||||
#[cfg(not(teehee))]
|
||||
if true {
|
||||
println!("Hello world!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue