Use macro source when creating Sugg helper
This commit is contained in:
parent
f51aade56f
commit
f0d642ea38
4 changed files with 42 additions and 22 deletions
|
|
@ -139,6 +139,9 @@ fn main() {
|
|||
// Fix #5962
|
||||
if matches!(true, true) && matches!(true, true) {}
|
||||
|
||||
// Issue #9375
|
||||
if matches!(true, true) && truth() && matches!(true, true) {}
|
||||
|
||||
if true {
|
||||
#[cfg(not(teehee))]
|
||||
if true {
|
||||
|
|
|
|||
|
|
@ -155,6 +155,11 @@ fn main() {
|
|||
if matches!(true, true) {}
|
||||
}
|
||||
|
||||
// Issue #9375
|
||||
if matches!(true, true) && truth() {
|
||||
if matches!(true, true) {}
|
||||
}
|
||||
|
||||
if true {
|
||||
#[cfg(not(teehee))]
|
||||
if true {
|
||||
|
|
|
|||
|
|
@ -126,5 +126,13 @@ LL | | if matches!(true, true) {}
|
|||
LL | | }
|
||||
| |_____^ help: collapse nested if block: `if matches!(true, true) && matches!(true, true) {}`
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
error: this `if` statement can be collapsed
|
||||
--> $DIR/collapsible_if.rs:159:5
|
||||
|
|
||||
LL | / if matches!(true, true) && truth() {
|
||||
LL | | if matches!(true, true) {}
|
||||
LL | | }
|
||||
| |_____^ help: collapse nested if block: `if matches!(true, true) && truth() && matches!(true, true) {}`
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue