make the eval() functions on our const types return the resulting value
This commit is contained in:
parent
e5fedceabf
commit
6e4779ab17
16 changed files with 167 additions and 245 deletions
|
@ -2054,7 +2054,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
tcx: self.tcx,
|
||||
ty_op: |ty| ty,
|
||||
lt_op: |lt| lt,
|
||||
ct_op: |ct| ct.eval(self.tcx, ty::ParamEnv::empty()),
|
||||
ct_op: |ct| ct.normalize(self.tcx, ty::ParamEnv::empty()),
|
||||
});
|
||||
cand
|
||||
})
|
||||
|
|
|
@ -288,7 +288,7 @@ pub fn normalize_param_env_or_error<'tcx>(
|
|||
// should actually be okay since without `feature(generic_const_exprs)` the only
|
||||
// const arguments that have a non-empty param env are array repeat counts. These
|
||||
// do not appear in the type system though.
|
||||
c.eval(self.0, ty::ParamEnv::empty())
|
||||
c.normalize(self.0, ty::ParamEnv::empty())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -761,7 +761,7 @@ impl<'a, 'b, 'tcx> TypeFolder<TyCtxt<'tcx>> for AssocTypeNormalizer<'a, 'b, 'tcx
|
|||
self.selcx.infcx,
|
||||
&mut self.universes,
|
||||
constant,
|
||||
|constant| constant.eval(tcx, self.param_env),
|
||||
|constant| constant.normalize(tcx, self.param_env),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -358,7 +358,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for QueryNormalizer<'cx, 'tcx>
|
|||
self.infcx,
|
||||
&mut self.universes,
|
||||
constant,
|
||||
|constant| constant.eval(self.infcx.tcx, self.param_env),
|
||||
|constant| constant.normalize(self.infcx.tcx, self.param_env),
|
||||
))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue