]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/writeback.rs
Remove non-descriptive boolean from search_for_structural_match_violation
[rust.git] / compiler / rustc_typeck / src / check / writeback.rs
index 0cbb0e25d0d429cb6340b9e19671985c856e0bf4..d102fb45a8cbce446c3e77e239e66e85933a03c1 100644 (file)
@@ -4,7 +4,8 @@
 
 use crate::check::FnCtxt;
 
-use rustc_data_structures::stable_map::FxHashMap;
+use hir::def_id::LocalDefId;
+use rustc_data_structures::fx::FxHashMap;
 use rustc_errors::ErrorGuaranteed;
 use rustc_hir as hir;
 use rustc_hir::def_id::DefId;
@@ -509,13 +510,13 @@ fn visit_opaque_types(&mut self) {
                 hir::OpaqueTyOrigin::FnReturn(_) | hir::OpaqueTyOrigin::AsyncFn(_) => {
                     let ty = self.resolve(decl.hidden_type.ty, &decl.hidden_type.span);
                     struct RecursionChecker {
-                        def_id: DefId,
+                        def_id: LocalDefId,
                     }
                     impl<'tcx> ty::TypeVisitor<'tcx> for RecursionChecker {
                         type BreakTy = ();
                         fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
                             if let ty::Opaque(def_id, _) = *t.kind() {
-                                if def_id == self.def_id {
+                                if def_id == self.def_id.to_def_id() {
                                     return ControlFlow::Break(());
                                 }
                             }