cleanup and dedupe CTFE and Miri error reporting
This commit is contained in:
parent
3b91b1a37b
commit
1115ec601a
105 changed files with 724 additions and 601 deletions
|
@ -2304,7 +2304,7 @@ impl<'tcx> ConstantKind<'tcx> {
|
|||
// FIXME: We might want to have a `try_eval`-like function on `Unevaluated`
|
||||
match tcx.const_eval_resolve(param_env, uneval, None) {
|
||||
Ok(val) => Self::Val(val, ty),
|
||||
Err(ErrorHandled::TooGeneric | ErrorHandled::Linted) => self,
|
||||
Err(ErrorHandled::TooGeneric) => self,
|
||||
Err(ErrorHandled::Reported(guar)) => {
|
||||
Self::Ty(tcx.const_error_with_guaranteed(ty, guar))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue