1
Fork 0

update const_eval_resolve

This commit is contained in:
lcnr 2021-03-13 16:31:38 +01:00
parent 43ebac119b
commit 7c9b5b4ce0
13 changed files with 45 additions and 55 deletions

View file

@ -646,8 +646,8 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
match substituted_constant.val {
ty::ConstKind::Value(val) => collect_const_value(self.tcx, val, self.output),
ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }) => {
match self.tcx.const_eval_resolve(param_env, def, substs, promoted, None) {
ty::ConstKind::Unevaluated(unevaluated) => {
match self.tcx.const_eval_resolve(param_env, unevaluated, None) {
Ok(val) => collect_const_value(self.tcx, val, self.output),
Err(ErrorHandled::Reported(ErrorReported) | ErrorHandled::Linted) => {}
Err(ErrorHandled::TooGeneric) => span_bug!(