diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2022-09-09 15:08:06 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2022-10-07 07:06:16 -0500 |
| commit | 3b328e704953e34de401166cd76ca062e21d83d8 (patch) | |
| tree | 3736859ec78197d2d554422a1b1a8f7b1df57922 | |
| parent | 09a554db25840a35bbfc13d531e288801b10fe6a (diff) | |
| download | rust-3b328e704953e34de401166cd76ca062e21d83d8.tar.gz rust-3b328e704953e34de401166cd76ca062e21d83d8.zip | |
Introduce TypeErrCtxt
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't need to.
| -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 eb2eefe0d5a..406c842a6d0 100644 --- a/clippy_lints/src/future_not_send.rs +++ b/clippy_lints/src/future_not_send.rs @@ -7,7 +7,7 @@ use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::ty::{EarlyBinder, Opaque, PredicateKind::Trait}; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::{sym, Span}; -use rustc_trait_selection::traits::error_reporting::suggestions::InferCtxtExt; +use rustc_trait_selection::traits::error_reporting::suggestions::TypeErrCtxtExt; use rustc_trait_selection::traits::{self, FulfillmentError}; declare_clippy_lint! { @@ -90,7 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend { |db| { cx.tcx.infer_ctxt().enter(|infcx| { for FulfillmentError { obligation, .. } in send_errors { - infcx.maybe_note_obligation_cause_for_async_await(db, &obligation); + infcx.err_ctxt().maybe_note_obligation_cause_for_async_await(db, &obligation); if let Trait(trait_pred) = obligation.predicate.kind().skip_binder() { db.note(&format!( "`{}` doesn't implement `{}`", |
