diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2021-11-08 23:35:23 +0800 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2021-11-08 23:35:23 +0800 |
| commit | 6d23824ef439747bf7085bdfd9e09c7d304e1ab9 (patch) | |
| tree | 3fb1d078ae0c2866ec58bcf6e046ff8566426978 | |
| parent | c063203c2bacd015156f353d6de0c2071c9c26bd (diff) | |
Make select_* methods return Vec for TraitEngine
| -rw-r--r-- | clippy_lints/src/future_not_send.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/future_not_send.rs b/clippy_lints/src/future_not_send.rs index e18442515b8..6b2ac985555 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -77,13 +77,13 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend { if is_future { let send_trait = cx.tcx.get_diagnostic_item(sym::Send).unwrap(); let span = decl.output.span(); - let send_result = cx.tcx.infer_ctxt().enter(|infcx| { + let send_errors = cx.tcx.infer_ctxt().enter(|infcx| { let cause = traits::ObligationCause::misc(span, hir_id); let mut fulfillment_cx = traits::FulfillmentContext::new(); fulfillment_cx.register_bound(&infcx, cx.param_env, ret_ty, send_trait, cause); fulfillment_cx.select_all_or_error(&infcx) }); - if let Err(send_errors) = send_result { + if !send_errors.is_empty() { span_lint_and_then( cx, FUTURE_NOT_SEND, |
