mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Update ui tests to new rustc range printing
This commit is contained in:
parent
68369e5d37
commit
5381c4fcf6
@ -3,18 +3,16 @@ warning: This else block is redundant.
|
||||
--> $DIR/copies.rs:128:20
|
||||
|
|
||||
128 | } else {
|
||||
| ____________________^ starting here...
|
||||
| ____________________^
|
||||
129 | | continue;
|
||||
130 | | }
|
||||
| |_____________^ ...ending here
|
||||
| |_____________^
|
||||
|
|
||||
= note: #[warn(needless_continue)] on by default
|
||||
= help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so:
|
||||
if true {
|
||||
break;
|
||||
|
||||
// Merged code follows...
|
||||
|
||||
break;
|
||||
// Merged code follows...
|
||||
}
|
||||
|
||||
|
||||
@ -23,18 +21,16 @@ warning: This else block is redundant.
|
||||
--> $DIR/copies.rs:138:20
|
||||
|
|
||||
138 | } else {
|
||||
| ____________________^ starting here...
|
||||
| ____________________^
|
||||
139 | | continue;
|
||||
140 | | }
|
||||
| |_____________^ ...ending here
|
||||
| |_____________^
|
||||
|
|
||||
= note: #[warn(needless_continue)] on by default
|
||||
= help: Consider dropping the else clause and merging the code that follows (in the loop) with the if block, like so:
|
||||
if true {
|
||||
break;
|
||||
|
||||
// Merged code follows...
|
||||
|
||||
break;
|
||||
// Merged code follows...
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,10 +3,10 @@ error: This else block is redundant.
|
||||
--> $DIR/needless_continue.rs:26:16
|
||||
|
|
||||
26 | } else {
|
||||
| ________________^ starting here...
|
||||
| ________________^
|
||||
27 | | continue;
|
||||
28 | | }
|
||||
| |_________^ ...ending here
|
||||
| |_________^
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/needless_continue.rs:12:8
|
||||
@ -43,14 +43,13 @@ error: There is no need for an explicit `else` block for this `if` expression
|
||||
|
||||
--> $DIR/needless_continue.rs:41:9
|
||||
|
|
||||
41 | if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
|
||||
| _________^ starting here...
|
||||
41 | / if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
|
||||
42 | | continue;
|
||||
43 | | } else {
|
||||
44 | | println!("Blabber");
|
||||
45 | | println!("Jabber");
|
||||
46 | | }
|
||||
| |_________^ ...ending here
|
||||
| |_________^
|
||||
|
|
||||
= help: Consider dropping the else clause, and moving out the code in the else block, like so:
|
||||
if (zero!(i % 2) || nonzero!(i % 5)) && i % 3 != 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user