Skip to content

Commit 5c45420

Browse files
committed
Changed tests
1 parent 8455650 commit 5c45420

File tree

6 files changed

+17
-38
lines changed

6 files changed

+17
-38
lines changed

src/test/incremental/hashes/for_loops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn change_iterable() {
9494
}
9595

9696
#[cfg(not(cfail1))]
97-
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")]
97+
#[rustc_clean(cfg="cfail2", except="HirBody, mir_built")]
9898
#[rustc_clean(cfg="cfail3")]
9999
pub fn change_iterable() {
100100
let mut _x = 0;

src/test/ui/consts/array-literal-index-oob.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ fn main() {
22
&{[1, 2, 3][4]};
33
//~^ ERROR index out of bounds
44
//~| ERROR reaching this expression at runtime will panic or abort
5-
//~| ERROR this expression will panic at runtime
65
}

src/test/ui/consts/array-literal-index-oob.stderr

+1-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ LL | &{[1, 2, 3][4]};
66
|
77
= note: `#[deny(const_err)]` on by default
88

9-
error: this expression will panic at runtime
10-
--> $DIR/array-literal-index-oob.rs:2:5
11-
|
12-
LL | &{[1, 2, 3][4]};
13-
| ^^^^^^^^^^^^^^^ index out of bounds: the len is 3 but the index is 4
14-
159
error: reaching this expression at runtime will panic or abort
1610
--> $DIR/array-literal-index-oob.rs:2:7
1711
|
@@ -20,5 +14,5 @@ LL | &{[1, 2, 3][4]};
2014
| |
2115
| index out of bounds: the len is 3 but the index is 4
2216

23-
error: aborting due to 3 previous errors
17+
error: aborting due to 2 previous errors
2418

src/test/ui/consts/const-eval/issue-43197.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ LL | const Y: u32 = foo(0-1);
2121
| attempt to subtract with overflow
2222

2323
error[E0080]: evaluation of constant expression failed
24-
--> $DIR/issue-43197.rs:12:26
24+
--> $DIR/issue-43197.rs:12:23
2525
|
2626
LL | println!("{} {}", X, Y);
27-
| ^ referenced constant has errors
27+
| ^ referenced constant has errors
2828

2929
error[E0080]: evaluation of constant expression failed
30-
--> $DIR/issue-43197.rs:12:23
30+
--> $DIR/issue-43197.rs:12:26
3131
|
3232
LL | println!("{} {}", X, Y);
33-
| ^ referenced constant has errors
33+
| ^ referenced constant has errors
3434

3535
error: aborting due to 2 previous errors
3636

src/test/ui/consts/const-eval/promoted_errors.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ fn main() {
77
let _x = 0u32 - 1;
88
//~^ ERROR this expression will panic at runtime [const_err]
99
println!("{}", 1/(1-1));
10-
//~^ ERROR this expression will panic at runtime [const_err]
11-
//~| ERROR attempt to divide by zero [const_err]
10+
//~^ ERROR attempt to divide by zero [const_err]
1211
//~| ERROR reaching this expression at runtime will panic or abort [const_err]
1312
let _x = 1/(1-1);
1413
//~^ ERROR const_err
1514
//~| ERROR const_err
1615
println!("{}", 1/(false as u32));
17-
//~^ ERROR this expression will panic at runtime [const_err]
18-
//~| ERROR attempt to divide by zero [const_err]
16+
//~^ ERROR attempt to divide by zero [const_err]
1917
//~| ERROR reaching this expression at runtime will panic or abort [const_err]
2018
let _x = 1/(false as u32);
2119
//~^ ERROR const_err

src/test/ui/consts/const-eval/promoted_errors.stderr

+9-21
Original file line numberDiff line numberDiff line change
@@ -16,59 +16,47 @@ error: attempt to divide by zero
1616
LL | println!("{}", 1/(1-1));
1717
| ^^^^^^^
1818

19-
error: this expression will panic at runtime
19+
error: reaching this expression at runtime will panic or abort
2020
--> $DIR/promoted_errors.rs:9:20
2121
|
2222
LL | println!("{}", 1/(1-1));
2323
| ^^^^^^^ attempt to divide by zero
2424

2525
error: attempt to divide by zero
26-
--> $DIR/promoted_errors.rs:13:14
26+
--> $DIR/promoted_errors.rs:12:14
2727
|
2828
LL | let _x = 1/(1-1);
2929
| ^^^^^^^
3030

3131
error: this expression will panic at runtime
32-
--> $DIR/promoted_errors.rs:13:14
32+
--> $DIR/promoted_errors.rs:12:14
3333
|
3434
LL | let _x = 1/(1-1);
3535
| ^^^^^^^ attempt to divide by zero
3636

3737
error: attempt to divide by zero
38-
--> $DIR/promoted_errors.rs:16:20
38+
--> $DIR/promoted_errors.rs:15:20
3939
|
4040
LL | println!("{}", 1/(false as u32));
4141
| ^^^^^^^^^^^^^^^^
4242

43-
error: this expression will panic at runtime
44-
--> $DIR/promoted_errors.rs:16:20
43+
error: reaching this expression at runtime will panic or abort
44+
--> $DIR/promoted_errors.rs:15:20
4545
|
4646
LL | println!("{}", 1/(false as u32));
4747
| ^^^^^^^^^^^^^^^^ attempt to divide by zero
4848

4949
error: attempt to divide by zero
50-
--> $DIR/promoted_errors.rs:20:14
50+
--> $DIR/promoted_errors.rs:18:14
5151
|
5252
LL | let _x = 1/(false as u32);
5353
| ^^^^^^^^^^^^^^^^
5454

5555
error: this expression will panic at runtime
56-
--> $DIR/promoted_errors.rs:20:14
56+
--> $DIR/promoted_errors.rs:18:14
5757
|
5858
LL | let _x = 1/(false as u32);
5959
| ^^^^^^^^^^^^^^^^ attempt to divide by zero
6060

61-
error: reaching this expression at runtime will panic or abort
62-
--> $DIR/promoted_errors.rs:16:20
63-
|
64-
LL | println!("{}", 1/(false as u32));
65-
| ^^^^^^^^^^^^^^^^ attempt to divide by zero
66-
67-
error: reaching this expression at runtime will panic or abort
68-
--> $DIR/promoted_errors.rs:9:20
69-
|
70-
LL | println!("{}", 1/(1-1));
71-
| ^^^^^^^ attempt to divide by zero
72-
73-
error: aborting due to 11 previous errors
61+
error: aborting due to 9 previous errors
7462

0 commit comments

Comments
 (0)