Skip to content

Commit f5f0273

Browse files
committed
Update ui tests to latest rustc changes
1 parent 299ffca commit f5f0273

File tree

3 files changed

+35
-33
lines changed

3 files changed

+35
-33
lines changed

tests/ui/never_loop.stderr

+9-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ error: this loop never actually loops
2424
error: this loop never actually loops
2525
--> $DIR/never_loop.rs:47:2
2626
|
27-
47 | / loop { // never loops
27+
47 | loop { // never loops
28+
| _____^
2829
48 | | while i == 0 { // never loops
2930
49 | | break
3031
50 | | }
3132
51 | | return
32-
52 | | }
33-
| |__^
33+
52 | | }
34+
| |_____^
3435

3536
error: this loop never actually loops
3637
--> $DIR/never_loop.rs:48:9
@@ -43,11 +44,12 @@ error: this loop never actually loops
4344
error: this loop never actually loops
4445
--> $DIR/never_loop.rs:59:3
4546
|
46-
59 | / loop { // never loops
47+
59 | loop { // never loops
48+
| _________^
4749
60 | | if x == 5 { break }
48-
61 | | continue 'outer
49-
62 | | }
50-
| |___^
50+
61 | | continue 'outer
51+
62 | | }
52+
| |_________^
5153

5254
error: this loop never actually loops
5355
--> $DIR/never_loop.rs:92:5
+16-16
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
error: 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

99
error: 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

1515
error: 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

2121
error: 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

2727
error: 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

3333
error: 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

3939
error: 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

4545
error: 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

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
error: 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

99
error: 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

1515
error: 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

2121
error: 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

2727
error: 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

0 commit comments

Comments
 (0)