]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_privacy/src/lib.rs
Rollup merge of #98718 - yoshuawuyts:stabilize-into-future, r=yaahc
[rust.git] / compiler / rustc_privacy / src / lib.rs
index f5e323e2bc40ef864ec6e0c14077a455214ebfbf..5560d44aa0d52f5428252a3dd2f1fa2fa06b76ba 100644 (file)
@@ -27,7 +27,7 @@
 use rustc_middle::ty::query::Providers;
 use rustc_middle::ty::subst::InternalSubsts;
 use rustc_middle::ty::{self, Const, DefIdTree, GenericParamDefKind};
-use rustc_middle::ty::{TraitRef, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, TypeVisitor};
+use rustc_middle::ty::{TraitRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor};
 use rustc_session::lint;
 use rustc_span::hygiene::Transparency;
 use rustc_span::symbol::{kw, Ident};
@@ -80,7 +80,7 @@ fn skeleton(&mut self) -> DefIdVisitorSkeleton<'_, 'tcx, Self> {
             dummy: Default::default(),
         }
     }
-    fn visit(&mut self, ty_fragment: impl TypeFoldable<'tcx>) -> ControlFlow<Self::BreakTy> {
+    fn visit(&mut self, ty_fragment: impl TypeVisitable<'tcx>) -> ControlFlow<Self::BreakTy> {
         ty_fragment.visit_with(&mut self.skeleton())
     }
     fn visit_trait(&mut self, trait_ref: TraitRef<'tcx>) -> ControlFlow<Self::BreakTy> {
@@ -467,7 +467,7 @@ fn update_reachability_from_macro(&mut self, local_def_id: LocalDefId, md: &Macr
         }
 
         let macro_module_def_id = self.tcx.local_parent(local_def_id);
-        if self.tcx.hir().opt_def_kind(macro_module_def_id) != Some(DefKind::Mod) {
+        if self.tcx.opt_def_kind(macro_module_def_id) != Some(DefKind::Mod) {
             // The macro's parent doesn't correspond to a `mod`, return early (#63164, #65252).
             return;
         }