Rollup merge of #104317 - RalfJung:ctfe-error-reporting, r=oli-obk
cleanup and dedupe CTFE and Miri error reporting It looks like most of the time, this error raised from const_prop_lint is just redundant -- it duplicates the error reported when evaluating the const-eval query. This lets us make `ConstEvalErr` private to the const_eval module which I think is a good step. The Miri change mostly replaces a `match` by `if let`, and dedupes the "this error is impossible in Miri" checks. r? ``@oli-obk`` Fixes https://github.com/rust-lang/rust/issues/75461
This commit is contained in:
commit
353b915fec
105 changed files with 724 additions and 601 deletions
|
@ -189,7 +189,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
|
|||
all_consts_ok = false;
|
||||
match err {
|
||||
// errored or at least linted
|
||||
ErrorHandled::Reported(_) | ErrorHandled::Linted => {}
|
||||
ErrorHandled::Reported(_) => {}
|
||||
ErrorHandled::TooGeneric => {
|
||||
span_bug!(const_.span, "codegen encountered polymorphic constant: {:?}", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue