update const_eval_resolve
This commit is contained in:
parent
43ebac119b
commit
7c9b5b4ce0
13 changed files with 45 additions and 55 deletions
|
@ -556,18 +556,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
debug!(?c1, ?c2, "evaluate_predicate_recursively: equating consts");
|
||||
|
||||
let evaluate = |c: &'tcx ty::Const<'tcx>| {
|
||||
if let ty::ConstKind::Unevaluated(ty::Unevaluated {
|
||||
def,
|
||||
substs,
|
||||
promoted,
|
||||
}) = c.val
|
||||
{
|
||||
if let ty::ConstKind::Unevaluated(unevaluated) = c.val {
|
||||
self.infcx
|
||||
.const_eval_resolve(
|
||||
obligation.param_env,
|
||||
def,
|
||||
substs,
|
||||
promoted,
|
||||
unevaluated,
|
||||
Some(obligation.cause.span),
|
||||
)
|
||||
.map(|val| ty::Const::from_value(self.tcx(), val, c.ty))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue