Skip to content

Commit 3b328e7

Browse files
committed
Introduce TypeErrCtxt
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't need to.
1 parent 09a554d commit 3b328e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/future_not_send.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_lint::{LateContext, LateLintPass};
77
use rustc_middle::ty::{EarlyBinder, Opaque, PredicateKind::Trait};
88
use rustc_session::{declare_lint_pass, declare_tool_lint};
99
use rustc_span::{sym, Span};
10-
use rustc_trait_selection::traits::error_reporting::suggestions::InferCtxtExt;
10+
use rustc_trait_selection::traits::error_reporting::suggestions::TypeErrCtxtExt;
1111
use rustc_trait_selection::traits::{self, FulfillmentError};
1212

1313
declare_clippy_lint! {
@@ -90,7 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
9090
|db| {
9191
cx.tcx.infer_ctxt().enter(|infcx| {
9292
for FulfillmentError { obligation, .. } in send_errors {
93-
infcx.maybe_note_obligation_cause_for_async_await(db, &obligation);
93+
infcx.err_ctxt().maybe_note_obligation_cause_for_async_await(db, &obligation);
9494
if let Trait(trait_pred) = obligation.predicate.kind().skip_binder() {
9595
db.note(&format!(
9696
"`{}` doesn't implement `{}`",

0 commit comments

Comments
 (0)