about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2022-09-09 15:08:06 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2022-10-07 07:06:16 -0500
commit3b328e704953e34de401166cd76ca062e21d83d8 (patch)
tree3736859ec78197d2d554422a1b1a8f7b1df57922
parent09a554db25840a35bbfc13d531e288801b10fe6a (diff)
downloadrust-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.rs4
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 `{}`",