diff options
Diffstat (limited to 'src/test/ui/consts/const-eval/union-ice.stderr')
| -rw-r--r-- | src/test/ui/consts/const-eval/union-ice.stderr | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/consts/const-eval/union-ice.stderr b/src/test/ui/consts/const-eval/union-ice.stderr index 4484dd6a147..7f5cb731c8e 100644 --- a/src/test/ui/consts/const-eval/union-ice.stderr +++ b/src/test/ui/consts/const-eval/union-ice.stderr @@ -1,15 +1,15 @@ -error: this constant cannot be used +error: any use of this value will cause an error --> $DIR/union-ice.rs:23:1 | -LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR this constant cannot be used +LL | const FIELD3: Field3 = unsafe { UNION.field3 }; //~ ERROR will cause an error | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to read undefined bytes | = note: #[deny(const_err)] on by default -error[E0080]: this constant likely exhibits undefined behavior +error: any use of this value will cause an error --> $DIR/union-ice.rs:25:1 | -LL | / const FIELD_PATH: Struct = Struct { //~ ERROR this constant likely exhibits undefined behavior +LL | / const FIELD_PATH: Struct = Struct { //~ ERROR any use of this value will cause an error LL | | a: 42, LL | | b: unsafe { UNION.field3 }, LL | | }; @@ -17,10 +17,10 @@ LL | | }; | = 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 -error[E0080]: this constant likely exhibits undefined behavior +error[E0080]: it is undefined behavior to use this value --> $DIR/union-ice.rs:35:1 | -LL | / const FIELD_PATH2: Struct2 = Struct2 { //~ ERROR this constant likely exhibits undefined behavior +LL | / const FIELD_PATH2: Struct2 = Struct2 { //~ ERROR it is undefined behavior to use this value LL | | b: [ LL | | 21, LL | | unsafe { UNION.field3 }, |
