Skip to content

Commit 53139c5

Browse files
Correct stderr output for failing tests
1 parent 6d4e588 commit 53139c5

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const fn foo() -> ! {
55
unsafe { std::mem::transmute(()) }
6-
//~^ WARN any use of this value will cause an error [const_err]
6+
//~^ ERROR evaluation of constant value failed
77
//~| WARN the type `!` does not permit zero-initialization [invalid_value]
88
}
99

@@ -12,7 +12,7 @@ enum Empty { }
1212

1313
#[warn(const_err)]
1414
const FOO: [Empty; 3] = [foo(); 3];
15-
15+
//~^ WARN any use of this value will cause an error
1616
#[warn(const_err)]
1717
const BAR: [Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
1818
//~^ ERROR it is undefined behavior to use this value

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

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
warning: any use of this value will cause an error
1+
error[E0080]: evaluation of constant value failed
22
--> $DIR/validate_uninhabited_zsts.rs:5:14
33
|
44
LL | unsafe { std::mem::transmute(()) }
5-
| ^^^^^^^^^^^^^^^^^^^^^^^
6-
| |
7-
| entering unreachable code
8-
| inside call to `foo` at $DIR/validate_uninhabited_zsts.rs:14:26
9-
...
5+
| ^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
6+
7+
warning: any use of this value will cause an error
8+
--> $DIR/validate_uninhabited_zsts.rs:14:26
9+
|
1010
LL | const FOO: [Empty; 3] = [foo(); 3];
11-
| -----------------------------------
11+
| -------------------------^^^^^-----
12+
| |
13+
| referenced constant has errors
1214
|
1315
note: lint level defined here
1416
--> $DIR/validate_uninhabited_zsts.rs:13:8
@@ -47,6 +49,6 @@ LL | const BAR: [Empty; 3] = [unsafe { std::mem::transmute(()) }; 3];
4749
|
4850
= note: 0-variant enums have no valid value
4951

50-
error: aborting due to previous error
52+
error: aborting due to 2 previous errors
5153

5254
For more information about this error, try `rustc --explain E0080`.

src/test/ui/generator/async-generator-issue-67158.stderr

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ LL | async { yield print!(":C") };
66

77
error: aborting due to previous error
88

9-
For more information about this error, try `rustc --explain E0727`.

0 commit comments

Comments
 (0)