diff options
| author | Philipp Hansch <dev@phansch.net> | 2020-04-19 14:00:03 +0200 |
|---|---|---|
| committer | Philipp Hansch <dev@phansch.net> | 2020-04-19 14:00:03 +0200 |
| commit | 502a66de3dd1cd899a8d287b82d4e21cb210dd6b (patch) | |
| tree | 4df0190f9531dc509cde7f74f7a30ff1f65af8d0 | |
| parent | 1c0e4e5b97f05d6f397bf941b16e1e826310a5ed (diff) | |
| download | rust-502a66de3dd1cd899a8d287b82d4e21cb210dd6b.tar.gz rust-502a66de3dd1cd899a8d287b82d4e21cb210dd6b.zip | |
Cleanup: future_not_send: use `return_ty` method
| -rw-r--r-- | clippy_lints/src/future_not_send.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs index 57f47bc9bc9..704a95ec0a0 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -60,10 +60,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for FutureNotSend { if let FnKind::Closure(_) = kind { return; } - let def_id = cx.tcx.hir().local_def_id(hir_id); - let fn_sig = cx.tcx.fn_sig(def_id); - let fn_sig = cx.tcx.erase_late_bound_regions(&fn_sig); - let ret_ty = fn_sig.output(); + let ret_ty = utils::return_ty(cx, hir_id); if let Opaque(id, subst) = ret_ty.kind { let preds = cx.tcx.predicates_of(id).instantiate(cx.tcx, subst); let mut is_future = false; |
