Skip to content

Commit 419d2d8

Browse files
committed
Update const eval uninhabited messages
1 parent 4c88be3 commit 419d2d8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/test/ui/consts/const-eval/ub-uninhabit.stderr

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ error[E0080]: it is undefined behavior to use this value
22
--> $DIR/ub-uninhabit.rs:19:1
33
|
44
LL | const BAD_BAD_BAD: Bar = unsafe { mem::transmute(()) };
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------^^^
6+
| |
7+
| entered unreachable code
68
|
7-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
9+
= note: #[deny(const_err)] on by default
810

911
error[E0080]: it is undefined behavior to use this value
1012
--> $DIR/ub-uninhabit.rs:22:1
@@ -18,9 +20,9 @@ error[E0080]: it is undefined behavior to use this value
1820
--> $DIR/ub-uninhabit.rs:25:1
1921
|
2022
LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { mem::transmute(()) };
21-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at [0]
22-
|
23-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------^^^
24+
| |
25+
| entered unreachable code
2426

2527
error: aborting due to 3 previous errors
2628

0 commit comments

Comments
 (0)