X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fconsts%2Ftransmute-size-mismatch-before-typeck.rs;h=852a5b3b46a21385dd0f7ab014c13340facec3e1;hb=a1b06388ce42ab7dd8aad1aebf87fa5299e2e08a;hp=2e1d5d26b5c7518072e7baab20733946388d8fd5;hpb=c56cbf976c861d28d145549d2aa5736a189a930c;p=rust.git 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 2e1d5d26b5c..852a5b3b46a 100644 --- a/src/test/ui/consts/transmute-size-mismatch-before-typeck.rs +++ b/src/test/ui/consts/transmute-size-mismatch-before-typeck.rs @@ -5,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