File tree 3 files changed +35
-33
lines changed
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
24
24
error: this loop never actually loops
25
25
--> $DIR/never_loop.rs:47:2
26
26
|
27
- 47 | / loop { // never loops
27
+ 47 | loop { // never loops
28
+ | _____^
28
29
48 | | while i == 0 { // never loops
29
30
49 | | break
30
31
50 | | }
31
32
51 | | return
32
- 52 | | }
33
- | |__ ^
33
+ 52 | | }
34
+ | |_____ ^
34
35
35
36
error: this loop never actually loops
36
37
--> $DIR/never_loop.rs:48:9
@@ -43,11 +44,12 @@ error: this loop never actually loops
43
44
error: this loop never actually loops
44
45
--> $DIR/never_loop.rs:59:3
45
46
|
46
- 59 | / loop { // never loops
47
+ 59 | loop { // never loops
48
+ | _________^
47
49
60 | | if x == 5 { break }
48
- 61 | | continue 'outer
49
- 62 | | }
50
- | |___ ^
50
+ 61 | | continue 'outer
51
+ 62 | | }
52
+ | |_________ ^
51
53
52
54
error: this loop never actually loops
53
55
--> $DIR/never_loop.rs:92:5
Original file line number Diff line number Diff line change 1
1
error: You are trying to use classic C overflow conditions that will fail in Rust.
2
2
--> $DIR/overflow_check_conditional.rs:11:5
3
3
|
4
- 11 | if a + b < a {
5
- | ^^^^^^^^^
4
+ 11 | if a + b < a {
5
+ | ^^^^^^^^^
6
6
|
7
7
= note: `-D overflow-check-conditional` implied by `-D warnings`
8
8
9
9
error: You are trying to use classic C overflow conditions that will fail in Rust.
10
10
--> $DIR/overflow_check_conditional.rs:14:5
11
11
|
12
- 14 | if a > a + b {
13
- | ^^^^^^^^^
12
+ 14 | if a > a + b {
13
+ | ^^^^^^^^^
14
14
15
15
error: You are trying to use classic C overflow conditions that will fail in Rust.
16
16
--> $DIR/overflow_check_conditional.rs:17:5
17
17
|
18
- 17 | if a + b < b {
19
- | ^^^^^^^^^
18
+ 17 | if a + b < b {
19
+ | ^^^^^^^^^
20
20
21
21
error: You are trying to use classic C overflow conditions that will fail in Rust.
22
22
--> $DIR/overflow_check_conditional.rs:20:5
23
23
|
24
- 20 | if b > a + b {
25
- | ^^^^^^^^^
24
+ 20 | if b > a + b {
25
+ | ^^^^^^^^^
26
26
27
27
error: You are trying to use classic C underflow conditions that will fail in Rust.
28
28
--> $DIR/overflow_check_conditional.rs:23:5
29
29
|
30
- 23 | if a - b > b {
31
- | ^^^^^^^^^
30
+ 23 | if a - b > b {
31
+ | ^^^^^^^^^
32
32
33
33
error: You are trying to use classic C underflow conditions that will fail in Rust.
34
34
--> $DIR/overflow_check_conditional.rs:26:5
35
35
|
36
- 26 | if b < a - b {
37
- | ^^^^^^^^^
36
+ 26 | if b < a - b {
37
+ | ^^^^^^^^^
38
38
39
39
error: You are trying to use classic C underflow conditions that will fail in Rust.
40
40
--> $DIR/overflow_check_conditional.rs:29:5
41
41
|
42
- 29 | if a - b > a {
43
- | ^^^^^^^^^
42
+ 29 | if a - b > a {
43
+ | ^^^^^^^^^
44
44
45
45
error: You are trying to use classic C underflow conditions that will fail in Rust.
46
46
--> $DIR/overflow_check_conditional.rs:32:5
47
47
|
48
- 32 | if a < a - b {
49
- | ^^^^^^^^^
48
+ 32 | if a < a - b {
49
+ | ^^^^^^^^^
50
50
Original file line number Diff line number Diff line change 1
1
error: Closure called just once immediately after it was declared
2
2
--> $DIR/redundant_closure_call.rs:15:2
3
3
|
4
- 15 | i = closure();
5
- | ^^^^^^^^^^^^^
4
+ 15 | i = closure();
5
+ | ^^^^^^^^^^^^^
6
6
|
7
7
= note: `-D redundant-closure-call` implied by `-D warnings`
8
8
9
9
error: Closure called just once immediately after it was declared
10
10
--> $DIR/redundant_closure_call.rs:18:2
11
11
|
12
- 18 | i = closure(3);
13
- | ^^^^^^^^^^^^^^
12
+ 18 | i = closure(3);
13
+ | ^^^^^^^^^^^^^^
14
14
15
15
error: Try not to call a closure in the expression where it is declared.
16
16
--> $DIR/redundant_closure_call.rs:7:10
17
17
|
18
- 7 | let a = (|| 42)();
19
- | ^^^^^^^^^ help: Try doing something like: : `42`
18
+ 7 | let a = (|| 42)();
19
+ | ^^^^^^^^^ help: Try doing something like: : `42`
20
20
21
21
error: Try not to call a closure in the expression where it is declared.
22
22
--> $DIR/redundant_closure_call.rs:10:14
23
23
|
24
- 10 | let mut k = (|m| m+1)(i);
25
- | ^^^^^^^^^^^^
24
+ 10 | let mut k = (|m| m+1)(i);
25
+ | ^^^^^^^^^^^^
26
26
27
27
error: Try not to call a closure in the expression where it is declared.
28
28
--> $DIR/redundant_closure_call.rs:12:6
29
29
|
30
- 12 | k = (|a,b| a*b)(1,5);
31
- | ^^^^^^^^^^^^^^^^
30
+ 12 | k = (|a,b| a*b)(1,5);
31
+ | ^^^^^^^^^^^^^^^^
32
32
You can’t perform that action at this time.
0 commit comments