X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fconsts%2Fconst-eval%2Fub-wide-ptr.rs;h=2894ef831884cda462a4acbf9bbd9d643bd9fb6d;hb=d6298d3dc835baa475c06749bfcff56b59cdad9c;hp=65f6f023528d036712906b98b98406f350a590aa;hpb=46244f335b5262ef9bdc34cc564b4dea221948f6;p=rust.git diff --git a/src/test/ui/consts/const-eval/ub-wide-ptr.rs b/src/test/ui/consts/const-eval/ub-wide-ptr.rs index 65f6f023528..2894ef83188 100644 --- a/src/test/ui/consts/const-eval/ub-wide-ptr.rs +++ b/src/test/ui/consts/const-eval/ub-wide-ptr.rs @@ -82,18 +82,18 @@ impl Trait for bool {} // bad data *inside* the slice const SLICE_CONTENT_INVALID: &[bool] = &[unsafe { mem::transmute(3u8) }]; //~^ ERROR it is undefined behavior to use this value -//~| ERROR evaluation of constant value failed +//~| constant // good MySliceBool const MYSLICE_GOOD: &MySliceBool = &MySlice(true, [false]); // bad: sized field is not okay const MYSLICE_PREFIX_BAD: &MySliceBool = &MySlice(unsafe { mem::transmute(3u8) }, [false]); //~^ ERROR it is undefined behavior to use this value -//~| ERROR evaluation of constant value failed +//~| constant // bad: unsized part is not okay const MYSLICE_SUFFIX_BAD: &MySliceBool = &MySlice(true, [unsafe { mem::transmute(3u8) }]); //~^ ERROR it is undefined behavior to use this value -//~| ERROR evaluation of constant value failed +//~| constant // # raw slice const RAW_SLICE_VALID: *const [u8] = unsafe { mem::transmute((&42u8, 1usize)) }; // ok