rust/tests/ui/suspicious_else_formatting.stderr
Joshua Nelson ac9dd36856 Don't abort compilation after giving a lint error
The only reason to use `abort_if_errors` is when the program is so broken that either:
1. later passes get confused and ICE
2. any diagnostics from later passes would be noise

This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints.
So it can continue to lint and compile even if there are lint errors.
2021-11-08 01:22:28 +00:00

91 lines
2.6 KiB
Plaintext

error: this looks like an `else {..}` but the `else` is missing
--> $DIR/suspicious_else_formatting.rs:17:6
|
LL | } {
| ^
|
= note: `-D clippy::suspicious-else-formatting` implied by `-D warnings`
= note: to remove this lint, add the missing `else` or add a new line before the next block
error: this looks like an `else if` but the `else` is missing
--> $DIR/suspicious_else_formatting.rs:21:6
|
LL | } if foo() {
| ^
|
= note: to remove this lint, add the missing `else` or add a new line before the second `if`
error: this looks like an `else if` but the `else` is missing
--> $DIR/suspicious_else_formatting.rs:28:10
|
LL | } if foo() {
| ^
|
= note: to remove this lint, add the missing `else` or add a new line before the second `if`
error: this looks like an `else if` but the `else` is missing
--> $DIR/suspicious_else_formatting.rs:36:10
|
LL | } if foo() {
| ^
|
= note: to remove this lint, add the missing `else` or add a new line before the second `if`
error: this is an `else {..}` but the formatting might hide it
--> $DIR/suspicious_else_formatting.rs:45:6
|
LL | } else
| ______^
LL | | {
| |____^
|
= note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}`
error: this is an `else if` but the formatting might hide it
--> $DIR/suspicious_else_formatting.rs:57:6
|
LL | } else
| ______^
LL | | if foo() { // the span of the above error should continue here
| |____^
|
= note: to remove this lint, remove the `else` or remove the new line between `else` and `if`
error: this is an `else if` but the formatting might hide it
--> $DIR/suspicious_else_formatting.rs:62:6
|
LL | }
| ______^
LL | | else
LL | | if foo() { // the span of the above error should continue here
| |____^
|
= note: to remove this lint, remove the `else` or remove the new line between `else` and `if`
error: this is an `else {..}` but the formatting might hide it
--> $DIR/suspicious_else_formatting.rs:89:6
|
LL | }
| ______^
LL | |
LL | | else
LL | | {
| |____^
|
= note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}`
error: this is an `else {..}` but the formatting might hide it
--> $DIR/suspicious_else_formatting.rs:97:6
|
LL | }
| ______^
LL | | else
LL | |
LL | | {
| |____^
|
= note: to remove this lint, remove the `else` or remove the new line between `else` and `{..}`
error: aborting due to 9 previous errors