update const_eval_resolve
This commit is contained in:
parent
43ebac119b
commit
7c9b5b4ce0
13 changed files with 45 additions and 55 deletions
|
@ -803,17 +803,10 @@ impl AutoTraitFinder<'tcx> {
|
|||
}
|
||||
ty::PredicateKind::ConstEquate(c1, c2) => {
|
||||
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 {
|
||||
match select.infcx().const_eval_resolve(
|
||||
obligation.param_env,
|
||||
def,
|
||||
substs,
|
||||
promoted,
|
||||
unevaluated,
|
||||
Some(obligation.cause.span),
|
||||
) {
|
||||
Ok(val) => Ok(ty::Const::from_value(select.tcx(), val, c.ty)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue