about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-10-16 21:16:48 +0100
committervarkor <github@varkor.com>2018-12-11 11:18:55 +0000
commit419d2d8f319e30d4b8d071c10d427637056131a9 (patch)
treec64cc1ade57396e74df1d7f97d50f2faf80d7a01
parent4c88be3592ce027629baacc71c450aa997f066ff (diff)
downloadrust-419d2d8f319e30d4b8d071c10d427637056131a9.tar.gz
rust-419d2d8f319e30d4b8d071c10d427637056131a9.zip
Update const eval uninhabited messages
-rw-r--r--src/test/ui/consts/const-eval/ub-uninhabit.stderr12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test/ui/consts/const-eval/ub-uninhabit.stderr b/src/test/ui/consts/const-eval/ub-uninhabit.stderr
index c5ac72b639c..cadcedd6239 100644
--- a/src/test/ui/consts/const-eval/ub-uninhabit.stderr
+++ b/src/test/ui/consts/const-eval/ub-uninhabit.stderr
@@ -2,9 +2,11 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:19:1
    |
 LL | const BAD_BAD_BAD: Bar = unsafe { mem::transmute(()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------^^^
+   |                                   |
+   |                                   entered unreachable code
    |
-   = 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
+   = note: #[deny(const_err)] on by default
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:22:1
@@ -18,9 +20,9 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-uninhabit.rs:25:1
    |
 LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { mem::transmute(()) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at [0]
-   |
-   = 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
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------^^^
+   |                                          |
+   |                                          entered unreachable code
 
 error: aborting due to 3 previous errors