From 49705e0709eb4d04b6d9fa8c43e0fb07b2939e44 Mon Sep 17 00:00:00 2001 From: Hameer Abbasi Date: Thu, 1 Apr 2021 09:24:01 +0000 Subject: [PATCH] Limit the problematic tests to x86_64. --- .../union-const-eval-field.32bit.stderr | 14 ------ .../const-eval/union-const-eval-field.rs | 2 +- ...t.stderr => union-const-eval-field.stderr} | 0 .../consts/const-eval/union-ice.32bit.stderr | 47 ------------------- src/test/ui/consts/const-eval/union-ice.rs | 2 +- ...nion-ice.64bit.stderr => union-ice.stderr} | 0 6 files changed, 2 insertions(+), 63 deletions(-) delete mode 100644 src/test/ui/consts/const-eval/union-const-eval-field.32bit.stderr rename src/test/ui/consts/const-eval/{union-const-eval-field.64bit.stderr => union-const-eval-field.stderr} (100%) delete mode 100644 src/test/ui/consts/const-eval/union-ice.32bit.stderr rename src/test/ui/consts/const-eval/{union-ice.64bit.stderr => union-ice.stderr} (100%) diff --git a/src/test/ui/consts/const-eval/union-const-eval-field.32bit.stderr b/src/test/ui/consts/const-eval/union-const-eval-field.32bit.stderr deleted file mode 100644 index 472bd214de769..0000000000000 --- a/src/test/ui/consts/const-eval/union-const-eval-field.32bit.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/union-const-eval-field.rs:29:5 - | -LL | const FIELD3: Field3 = unsafe { UNION.field3 }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 4) { - __ __ __ __ __ __ __ __ │ ░░░░░░░░ - } - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const-eval/union-const-eval-field.rs b/src/test/ui/consts/const-eval/union-const-eval-field.rs index c91ed0acb2ee7..f8e1d6d569dd9 100644 --- a/src/test/ui/consts/const-eval/union-const-eval-field.rs +++ b/src/test/ui/consts/const-eval/union-const-eval-field.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +// only-x86_64 #![feature(const_fn)] type Field1 = i32; diff --git a/src/test/ui/consts/const-eval/union-const-eval-field.64bit.stderr b/src/test/ui/consts/const-eval/union-const-eval-field.stderr similarity index 100% rename from src/test/ui/consts/const-eval/union-const-eval-field.64bit.stderr rename to src/test/ui/consts/const-eval/union-const-eval-field.stderr diff --git a/src/test/ui/consts/const-eval/union-ice.32bit.stderr b/src/test/ui/consts/const-eval/union-ice.32bit.stderr deleted file mode 100644 index f8502ad66c5e0..0000000000000 --- a/src/test/ui/consts/const-eval/union-ice.32bit.stderr +++ /dev/null @@ -1,47 +0,0 @@ -error[E0080]: it is undefined behavior to use this value - --> $DIR/union-ice.rs:15:1 - | -LL | const FIELD3: Field3 = unsafe { UNION.field3 }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered uninitialized bytes, but expected initialized plain (non-pointer) bytes - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 8, align: 4) { - __ __ __ __ __ __ __ __ │ ░░░░░░░░ - } - -error[E0080]: it is undefined behavior to use this value - --> $DIR/union-ice.rs:17:1 - | -LL | / const FIELD_PATH: Struct = Struct { -LL | | a: 42, -LL | | b: unsafe { UNION.field3 }, -LL | | }; - | |__^ type validation failed: encountered uninitialized bytes at .b, but expected initialized plain (non-pointer) bytes - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 12, align: 4) { - __ __ __ __ __ __ __ __ 2a __ __ __ │ ░░░░░░░░*░░░ - } - -error[E0080]: it is undefined behavior to use this value - --> $DIR/union-ice.rs:27:1 - | -LL | / const FIELD_PATH2: Struct2 = Struct2 { -LL | | b: [ -LL | | 21, -LL | | unsafe { UNION.field3 }, -... | -LL | | a: 42, -LL | | }; - | |__^ type validation failed: encountered uninitialized bytes at .b[1] - | - = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. - = note: the raw bytes of the constant (size: 36, align: 4) { - 0x00 │ 15 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ │ ........░░░░░░░░ - 0x10 │ 17 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 │ ................ - 0x20 │ 2a __ __ __ │ *░░░ - } - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0080`. diff --git a/src/test/ui/consts/const-eval/union-ice.rs b/src/test/ui/consts/const-eval/union-ice.rs index c1e780d9bb72e..40e5a005ba4af 100644 --- a/src/test/ui/consts/const-eval/union-ice.rs +++ b/src/test/ui/consts/const-eval/union-ice.rs @@ -1,4 +1,4 @@ -// stderr-per-bitwidth +// only-x86_64 #![feature(const_fn)] type Field1 = i32; diff --git a/src/test/ui/consts/const-eval/union-ice.64bit.stderr b/src/test/ui/consts/const-eval/union-ice.stderr similarity index 100% rename from src/test/ui/consts/const-eval/union-ice.64bit.stderr rename to src/test/ui/consts/const-eval/union-ice.stderr