Rustup for const_err changes

This commit is contained in:
Aaron Hill 2021-05-31 10:50:25 -05:00
parent 178ae8e44c
commit 73700bc01c
No known key found for this signature in database
GPG key ID: B4087E510E98B164
3 changed files with 7 additions and 6 deletions

View file

@ -1 +1 @@
ce0d64e03ef9875e0935bb60e989542b7ec29579
d9feaaa548ce380159a1de68f4f6e605db9a9fc5

View file

@ -84,8 +84,10 @@ pub fn report_error<'tcx, 'mir>(
"resource exhaustion",
InvalidProgram(InvalidProgramInfo::ReferencedConstant) =>
"post-monomorphization error",
_ =>
bug!("This error should be impossible in Miri: {}", e),
InvalidProgram(InvalidProgramInfo::AlreadyReported(_)) =>
"error occurred",
kind =>
bug!("This error should be impossible in Miri: {:?}", kind),
};
#[rustfmt::skip]
let helps = match e.kind() {

View file

@ -8,13 +8,12 @@
struct PrintName<T>(T);
impl<T> PrintName<T> {
const VOID: ! = panic!(); //~WARN any use of this value will cause an error
//~^ WARN this was previously accepted
const VOID: ! = panic!(); //~ERROR any use of this value will cause an error
}
fn no_codegen<T>() {
if false {
let _ = PrintName::<T>::VOID; //~ERROR referenced constant has errors
let _ = PrintName::<T>::VOID; //~ERROR error occurred: encountered constant
}
}
fn main() {