Thread Constness through selection

This commit is contained in:
Jonas Schievink 2020-11-22 02:13:53 +01:00
parent 113c1476c9
commit 1464dcedfb

View file

@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
for &(p, _span) in preds {
let p = p.subst(cx.tcx, subst);
if let Some(trait_ref) = p.to_opt_poly_trait_ref() {
if Some(trait_ref.def_id()) == cx.tcx.lang_items().future_trait() {
if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() {
is_future = true;
break;
}