]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_analysis/src/collect.rs
Use proper InferCtxt when probing for associated types in astconv
[rust.git] / compiler / rustc_hir_analysis / src / collect.rs
index c17778ce8bc090e934b82b8399a5d05aa501ac22..c3ea867785b1461f1fdb2eb41409895ee7342a74 100644 (file)
@@ -25,7 +25,7 @@
 use rustc_hir::def_id::{DefId, LocalDefId};
 use rustc_hir::intravisit::{self, Visitor};
 use rustc_hir::{GenericParamKind, Node};
-use rustc_infer::infer::TyCtxtInferExt;
+use rustc_infer::infer::{InferCtxt, TyCtxtInferExt};
 use rustc_infer::traits::ObligationCause;
 use rustc_middle::hir::nested_filter;
 use rustc_middle::ty::query::Providers;
@@ -517,6 +517,10 @@ fn set_tainted_by_errors(&self, _: ErrorGuaranteed) {
     fn record_ty(&self, _hir_id: hir::HirId, _ty: Ty<'tcx>, _span: Span) {
         // There's no place to record types from signatures?
     }
+
+    fn infcx(&self) -> Option<&InferCtxt<'tcx>> {
+        None
+    }
 }
 
 /// Synthesize a new lifetime name that doesn't clash with any of the lifetimes already present.