about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/consts/transmute-size-mismatch-before-typeck.rs8
-rw-r--r--src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr10
2 files changed, 11 insertions, 7 deletions
diff --git a/src/test/ui/consts/transmute-size-mismatch-before-typeck.rs b/src/test/ui/consts/transmute-size-mismatch-before-typeck.rs
index 1235dd8dcbd..b5d2b4396f9 100644
--- a/src/test/ui/consts/transmute-size-mismatch-before-typeck.rs
+++ b/src/test/ui/consts/transmute-size-mismatch-before-typeck.rs
@@ -1,9 +1,13 @@
 #![feature(const_transmute)]
 
+// normalize-stderr-64bit "64 bits" -> "word size"
+// normalize-stderr-32bit "32 bits" -> "word size"
+// normalize-stderr-64bit "128 bits" -> "2 * word size"
+// normalize-stderr-32bit "64 bits" -> "2 * word size"
+
 fn main() {
     match &b""[..] {
-        ZST => {}
-        //~^ ERROR could not evaluate constant pattern
+        ZST => {} //~ ERROR could not evaluate constant pattern
     }
 }
 
diff --git a/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr b/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr
index 74de5dc9aaf..5f84204f408 100644
--- a/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr
+++ b/src/test/ui/consts/transmute-size-mismatch-before-typeck.stderr
@@ -1,5 +1,5 @@
 error: any use of this value will cause an error
-  --> $DIR/transmute-size-mismatch-before-typeck.rs:10:29
+  --> $DIR/transmute-size-mismatch-before-typeck.rs:14:29
    |
 LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
    | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^---
@@ -9,19 +9,19 @@ LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
    = note: `#[deny(const_err)]` on by default
 
 error: could not evaluate constant pattern
-  --> $DIR/transmute-size-mismatch-before-typeck.rs:5:9
+  --> $DIR/transmute-size-mismatch-before-typeck.rs:10:9
    |
 LL |         ZST => {}
    |         ^^^
 
 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/transmute-size-mismatch-before-typeck.rs:10:29
+  --> $DIR/transmute-size-mismatch-before-typeck.rs:14:29
    |
 LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
    |                             ^^^^^^^^^^^^^^^^^^^
    |
-   = note: source type: `usize` (64 bits)
-   = note: target type: `&'static [u8]` (128 bits)
+   = note: source type: `usize` (word size)
+   = note: target type: `&'static [u8]` (2 * word size)
 
 error: aborting due to 3 previous errors