Skip to content

Commit 6ed2ae8

Browse files
committed
Auto merge of rust-lang#5488 - phansch:future-not-send-ret-ty, r=flip1995
Cleanup: future_not_send: use `utils::return_ty` function changelog: none
2 parents 9273eab + 502a66d commit 6ed2ae8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clippy_lints/src/future_not_send.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for FutureNotSend {
6060
if let FnKind::Closure(_) = kind {
6161
return;
6262
}
63-
let def_id = cx.tcx.hir().local_def_id(hir_id);
64-
let fn_sig = cx.tcx.fn_sig(def_id);
65-
let fn_sig = cx.tcx.erase_late_bound_regions(&fn_sig);
66-
let ret_ty = fn_sig.output();
63+
let ret_ty = utils::return_ty(cx, hir_id);
6764
if let Opaque(id, subst) = ret_ty.kind {
6865
let preds = cx.tcx.predicates_of(id).instantiate(cx.tcx, subst);
6966
let mut is_future = false;

0 commit comments

Comments
 (0)