about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/method
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
commit4a68373217e610e2e6768bae27c6b15e0377faad (patch)
tree166a47334b30099ffdd126726a1d4839680c0688 /compiler/rustc_hir_analysis/src/check/method
parent58546803885164d488185fb9cb9fb04fcbe64e30 (diff)
downloadrust-4a68373217e610e2e6768bae27c6b15e0377faad.tar.gz
rust-4a68373217e610e2e6768bae27c6b15e0377faad.zip
Introduce TypeErrCtxt
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't
need to.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/method')
-rw-r--r--compiler/rustc_hir_analysis/src/check/method/suggest.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/method/suggest.rs b/compiler/rustc_hir_analysis/src/check/method/suggest.rs
index ad1084bd1b1..e276c4f7d84 100644
--- a/compiler/rustc_hir_analysis/src/check/method/suggest.rs
+++ b/compiler/rustc_hir_analysis/src/check/method/suggest.rs
@@ -22,7 +22,7 @@ use rustc_middle::ty::{IsSuggestable, ToPolyTraitRef};
 use rustc_span::symbol::{kw, sym, Ident};
 use rustc_span::Symbol;
 use rustc_span::{lev_distance, source_map, ExpnKind, FileName, MacroKind, Span};
-use rustc_trait_selection::traits::error_reporting::on_unimplemented::InferCtxtExt as _;
+use rustc_trait_selection::traits::error_reporting::on_unimplemented::TypeErrCtxtExt as _;
 use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _;
 use rustc_trait_selection::traits::{
     FulfillmentError, Obligation, ObligationCause, ObligationCauseCode, OnUnimplementedNote,
@@ -855,8 +855,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                                             // Avoid crashing.
                                             return (None, None);
                                         }
-                                        let OnUnimplementedNote { message, label, .. } =
-                                            self.on_unimplemented_note(trait_ref, &obligation);
+                                        let OnUnimplementedNote { message, label, .. } = self
+                                            .err_ctxt()
+                                            .on_unimplemented_note(trait_ref, &obligation);
                                         (message, label)
                                     })
                                     .unwrap_or((None, None))