]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/consts/transmute-size-mismatch-before-typeck.rs
Rollup merge of #98609 - TaKO8Ki:fix-ice-for-associated-constant-generics, r=lcnr
[rust.git] / src / test / ui / consts / transmute-size-mismatch-before-typeck.rs
index 0f0068ac3bdc13e1ebfa309fa0b13a02529860e3..852a5b3b46a21385dd0f7ab014c13340facec3e1 100644 (file)
@@ -1,5 +1,3 @@
-#![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"
@@ -7,15 +5,9 @@
 
 fn main() {
     match &b""[..] {
-        ZST => {} //~ ERROR could not evaluate constant pattern
-                  //~| ERROR could not evaluate constant pattern
+        ZST => {}
     }
 }
 
 const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
-//~^ ERROR any use of this value will cause an error
-//~| ERROR cannot transmute between types of different sizes
-//~| WARN this was previously accepted by the compiler but is being phased out
-
-// Once the `any use of this value will cause an error` disappears in this test, make sure to
-// remove the `TransmuteSizeDiff` error variant and make its emitter site an assertion again.
+//~^ ERROR cannot transmute between types of different sizes