Use macro source when creating Sugg helper

This commit is contained in:
dswij 2022-09-01 00:47:56 +08:00
parent f51aade56f
commit f0d642ea38
4 changed files with 42 additions and 22 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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