File tree Expand file tree Collapse file tree 3 files changed +35
-33
lines changed Expand file tree Collapse file tree 3 files changed +35
-33
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,14 @@ error: this loop never actually loops
2424error: this loop never actually loops
2525 --> $DIR/never_loop.rs:47:2
2626 |
27- 47 | / loop { // never loops
27+ 47 | loop { // never loops
28+ | _____^
282948 | | while i == 0 { // never loops
293049 | | break
303150 | | }
313251 | | return
32- 52 | | }
33- | |__ ^
33+ 52 | | }
34+ | |_____ ^
3435
3536error: this loop never actually loops
3637 --> $DIR/never_loop.rs:48:9
@@ -43,11 +44,12 @@ error: this loop never actually loops
4344error: this loop never actually loops
4445 --> $DIR/never_loop.rs:59:3
4546 |
46- 59 | / loop { // never loops
47+ 59 | loop { // never loops
48+ | _________^
474960 | | if x == 5 { break }
48- 61 | | continue 'outer
49- 62 | | }
50- | |___ ^
50+ 61 | | continue 'outer
51+ 62 | | }
52+ | |_________ ^
5153
5254error: this loop never actually loops
5355 --> $DIR/never_loop.rs:92:5
Original file line number Diff line number Diff line change 11error: You are trying to use classic C overflow conditions that will fail in Rust.
22 --> $DIR/overflow_check_conditional.rs:11:5
33 |
4- 11 | if a + b < a {
5- | ^^^^^^^^^
4+ 11 | if a + b < a {
5+ | ^^^^^^^^^
66 |
77 = note: `-D overflow-check-conditional` implied by `-D warnings`
88
99error: You are trying to use classic C overflow conditions that will fail in Rust.
1010 --> $DIR/overflow_check_conditional.rs:14:5
1111 |
12- 14 | if a > a + b {
13- | ^^^^^^^^^
12+ 14 | if a > a + b {
13+ | ^^^^^^^^^
1414
1515error: You are trying to use classic C overflow conditions that will fail in Rust.
1616 --> $DIR/overflow_check_conditional.rs:17:5
1717 |
18- 17 | if a + b < b {
19- | ^^^^^^^^^
18+ 17 | if a + b < b {
19+ | ^^^^^^^^^
2020
2121error: You are trying to use classic C overflow conditions that will fail in Rust.
2222 --> $DIR/overflow_check_conditional.rs:20:5
2323 |
24- 20 | if b > a + b {
25- | ^^^^^^^^^
24+ 20 | if b > a + b {
25+ | ^^^^^^^^^
2626
2727error: You are trying to use classic C underflow conditions that will fail in Rust.
2828 --> $DIR/overflow_check_conditional.rs:23:5
2929 |
30- 23 | if a - b > b {
31- | ^^^^^^^^^
30+ 23 | if a - b > b {
31+ | ^^^^^^^^^
3232
3333error: You are trying to use classic C underflow conditions that will fail in Rust.
3434 --> $DIR/overflow_check_conditional.rs:26:5
3535 |
36- 26 | if b < a - b {
37- | ^^^^^^^^^
36+ 26 | if b < a - b {
37+ | ^^^^^^^^^
3838
3939error: You are trying to use classic C underflow conditions that will fail in Rust.
4040 --> $DIR/overflow_check_conditional.rs:29:5
4141 |
42- 29 | if a - b > a {
43- | ^^^^^^^^^
42+ 29 | if a - b > a {
43+ | ^^^^^^^^^
4444
4545error: You are trying to use classic C underflow conditions that will fail in Rust.
4646 --> $DIR/overflow_check_conditional.rs:32:5
4747 |
48- 32 | if a < a - b {
49- | ^^^^^^^^^
48+ 32 | if a < a - b {
49+ | ^^^^^^^^^
5050
Original file line number Diff line number Diff line change 11error: Closure called just once immediately after it was declared
22 --> $DIR/redundant_closure_call.rs:15:2
33 |
4- 15 | i = closure();
5- | ^^^^^^^^^^^^^
4+ 15 | i = closure();
5+ | ^^^^^^^^^^^^^
66 |
77 = note: `-D redundant-closure-call` implied by `-D warnings`
88
99error: Closure called just once immediately after it was declared
1010 --> $DIR/redundant_closure_call.rs:18:2
1111 |
12- 18 | i = closure(3);
13- | ^^^^^^^^^^^^^^
12+ 18 | i = closure(3);
13+ | ^^^^^^^^^^^^^^
1414
1515error: Try not to call a closure in the expression where it is declared.
1616 --> $DIR/redundant_closure_call.rs:7:10
1717 |
18- 7 | let a = (|| 42)();
19- | ^^^^^^^^^ help: Try doing something like: : `42`
18+ 7 | let a = (|| 42)();
19+ | ^^^^^^^^^ help: Try doing something like: : `42`
2020
2121error: Try not to call a closure in the expression where it is declared.
2222 --> $DIR/redundant_closure_call.rs:10:14
2323 |
24- 10 | let mut k = (|m| m+1)(i);
25- | ^^^^^^^^^^^^
24+ 10 | let mut k = (|m| m+1)(i);
25+ | ^^^^^^^^^^^^
2626
2727error: Try not to call a closure in the expression where it is declared.
2828 --> $DIR/redundant_closure_call.rs:12:6
2929 |
30- 12 | k = (|a,b| a*b)(1,5);
31- | ^^^^^^^^^^^^^^^^
30+ 12 | k = (|a,b| a*b)(1,5);
31+ | ^^^^^^^^^^^^^^^^
3232
You can’t perform that action at this time.
0 commit comments