mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
Rustup for const_err changes
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
ce0d64e03ef9875e0935bb60e989542b7ec29579
|
||||
d9feaaa548ce380159a1de68f4f6e605db9a9fc5
|
||||
|
||||
+4
-2
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user