Use const_error_with_guaranteed more
This commit is contained in:
parent
34115d040b
commit
0f89fb1791
7 changed files with 51 additions and 15 deletions
|
@ -2251,7 +2251,9 @@ impl<'tcx> ConstantKind<'tcx> {
|
|||
match tcx.const_eval_resolve(param_env, uneval, None) {
|
||||
Ok(val) => Self::Val(val, ty),
|
||||
Err(ErrorHandled::TooGeneric | ErrorHandled::Linted) => self,
|
||||
Err(_) => Self::Ty(tcx.const_error(ty)),
|
||||
Err(ErrorHandled::Reported(guar)) => {
|
||||
Self::Ty(tcx.const_error_with_guaranteed(ty, guar))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue