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

This reverts commit 18bb8c61a975fff6424cda831ace5b0404277145, reversing
changes made to d9baa361902b172be716f96619b909f340802dea.
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 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
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;
}