Skip to content

Commit

Permalink
Cleanup: future_not_send: use return_ty method
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch committed Apr 19, 2020
1 parent 1c0e4e5 commit 502a66d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions clippy_lints/src/future_not_send.rs
Expand Up @@ -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;
Expand Down

0 comments on commit 502a66d

Please sign in to comment.