Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"

This reverts commit 18bb8c61a9, reversing
changes made to d9baa36190.
This commit is contained in:
Santiago Pastorino 2021-12-03 10:11:21 -03:00
parent dd03c0ff3e
commit 23f752f278

View File

@ -67,8 +67,8 @@ fn check_fn(
let mut is_future = false;
for &(p, _span) in preds {
let p = p.subst(cx.tcx, subst);
if let Some(trait_pred) = p.to_opt_poly_trait_pred() {
if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() {
if let Some(trait_ref) = p.to_opt_poly_trait_ref() {
if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() {
is_future = true;
break;
}