File tree 3 files changed +39
-39
lines changed
3 files changed +39
-39
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ 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 | / \tloop { // never loops
28
- 48 | | \t while i == 0 { // never loops
29
- 49 | | \t break
30
- 50 | | \t }
31
- 51 | | \t return
32
- 52 | | \t }
27
+ 47 | / loop { // never loops
28
+ 48 | | while i == 0 { // never loops
29
+ 49 | | break
30
+ 50 | | }
31
+ 51 | | return
32
+ 52 | | }
33
33
| |__^
34
34
35
35
error: this loop never actually loops
@@ -45,20 +45,20 @@ error: this loop never actually loops
45
45
|
46
46
57 | / 'outer: loop { // never loops
47
47
58 | | x += 1;
48
- 59 | | \t\tloop { // never loops
48
+ 59 | | loop { // never loops
49
49
60 | | if x == 5 { break }
50
50
... |
51
- 63 | | \t\treturn
52
- 64 | | \t }
51
+ 63 | | return
52
+ 64 | | }
53
53
| |__^
54
54
55
55
error: this loop never actually loops
56
56
--> $DIR/never_loop.rs:59:3
57
57
|
58
- 59 | / \t\tloop { // never loops
59
- 60 | | \t\t if x == 5 { break }
60
- 61 | | \t\t\tcontinue 'outer
61
- 62 | | \t\t }
58
+ 59 | / loop { // never loops
59
+ 60 | | if x == 5 { break }
60
+ 61 | | continue 'outer
61
+ 62 | | }
62
62
| |___^
63
63
64
64
error: this loop never actually loops
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 | \tif a + b < a {
5
- | \t ^^^^^^^^^
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 | \tif a > a + b {
13
- | \t ^^^^^^^^^
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 | \tif a + b < b {
19
- | \t ^^^^^^^^^
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 | \tif b > a + b {
25
- | \t ^^^^^^^^^
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 | \tif a - b > b {
31
- | \t ^^^^^^^^^
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 | \tif b < a - b {
37
- | \t ^^^^^^^^^
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 | \tif a - b > a {
43
- | \t ^^^^^^^^^
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 | \tif a < a - b {
49
- | \t ^^^^^^^^^
48
+ 32 | if a < a - b {
49
+ | ^^^^^^^^^
50
50
51
51
error: aborting due to 8 previous errors
52
52
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 | \ti = closure();
5
- | \t ^^^^^^^^^^^^^
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 | \ti = closure(3);
13
- | \t ^^^^^^^^^^^^^^
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 | \tlet a = (|| 42)();
19
- | \t ^^^^^^^^^ 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 | \tlet mut k = (|m| m+1)(i);
25
- | \t ^^^^^^^^^^^^
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 | \tk = (|a,b| a*b)(1,5);
31
- | \t ^^^^^^^^^^^^^^^^
30
+ 12 | k = (|a,b| a*b)(1,5);
31
+ | ^^^^^^^^^^^^^^^^
32
32
33
33
error: aborting due to 5 previous errors
34
34
You can’t perform that action at this time.
0 commit comments