diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-08-26 15:19:34 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-10-25 16:46:19 +0200 |
| commit | 7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3 (patch) | |
| tree | 659449f68fb00da4052dd67ba6725b17d6aaf26d /src/test/ui/consts/const-eval/ub-enum.rs | |
| parent | 3476ac0bee4042653ecb00207ceb9e02d2b647d0 (diff) | |
| download | rust-7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3.tar.gz rust-7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3.zip | |
Report const eval error inside the query
Diffstat (limited to 'src/test/ui/consts/const-eval/ub-enum.rs')
| -rw-r--r-- | src/test/ui/consts/const-eval/ub-enum.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/ui/consts/const-eval/ub-enum.rs b/src/test/ui/consts/const-eval/ub-enum.rs index bcb71af54af..2f7a5dda9ff 100644 --- a/src/test/ui/consts/const-eval/ub-enum.rs +++ b/src/test/ui/consts/const-eval/ub-enum.rs @@ -20,7 +20,7 @@ union TransmuteEnum { // A pointer is guaranteed non-null const BAD_ENUM: Enum = unsafe { TransmuteEnum { a: &1 }.b }; -//~^ ERROR this constant likely exhibits undefined behavior +//~^ ERROR is undefined behavior // Invalid enum discriminant #[repr(usize)] @@ -33,7 +33,7 @@ union TransmuteEnum2 { b: Enum2, } const BAD_ENUM2 : Enum2 = unsafe { TransmuteEnum2 { a: 0 }.b }; -//~^ ERROR this constant likely exhibits undefined behavior +//~^ ERROR is undefined behavior // Invalid enum field content (mostly to test printing of apths for enum tuple // variants and tuples). @@ -43,7 +43,7 @@ union TransmuteChar { } // Need to create something which does not clash with enum layout optimizations. const BAD_ENUM_CHAR : Option<(char, char)> = Some(('x', unsafe { TransmuteChar { a: !0 }.b })); -//~^ ERROR this constant likely exhibits undefined behavior +//~^ ERROR is undefined behavior fn main() { } |
