We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 603b865 + adf8c38 commit 41c48bdCopy full SHA for 41c48bd
clippy_lints/src/future_not_send.rs
@@ -68,8 +68,8 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
68
let mut is_future = false;
69
for &(p, _span) in preds {
70
let p = p.subst(cx.tcx, subst);
71
- if let Some(trait_ref) = p.to_opt_poly_trait_ref() {
72
- if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() {
+ 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() {
73
is_future = true;
74
break;
75
}
0 commit comments