diff options
| author | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-02-07 01:29:48 -0700 |
|---|---|---|
| committer | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-02-16 17:05:56 -0700 |
| commit | c183110cc26abb506dba0a4def917735fb6eb6f0 (patch) | |
| tree | 5f4a6764ed381c957728b9b11341f58eff93686b /compiler/rustc_privacy/src | |
| parent | d822b97a27e50f5a091d2918f6ff0ffd2d2827f5 (diff) | |
| download | rust-c183110cc26abb506dba0a4def917735fb6eb6f0.tar.gz rust-c183110cc26abb506dba0a4def917735fb6eb6f0.zip | |
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
Diffstat (limited to 'compiler/rustc_privacy/src')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index f59860b8abc..478dd431c48 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -207,7 +207,7 @@ where // so we need to visit the self type additionally. if let Some(assoc_item) = tcx.opt_associated_item(def_id) { if let Some(impl_def_id) = assoc_item.impl_container(tcx) { - tcx.bound_type_of(impl_def_id).subst_identity().visit_with(self)?; + tcx.type_of(impl_def_id).subst_identity().visit_with(self)?; } } } @@ -341,7 +341,7 @@ trait VisibilityLike: Sized { effective_visibilities: &EffectiveVisibilities, ) -> Self { let mut find = FindMin { tcx, effective_visibilities, min: Self::MAX }; - find.visit(tcx.bound_type_of(def_id).subst_identity()); + find.visit(tcx.type_of(def_id).subst_identity()); if let Some(trait_ref) = tcx.impl_trait_ref(def_id) { find.visit_trait(trait_ref.subst_identity()); } @@ -837,11 +837,11 @@ impl ReachEverythingInTheInterfaceVisitor<'_, '_> { GenericParamDefKind::Lifetime => {} GenericParamDefKind::Type { has_default, .. } => { if has_default { - self.visit(self.ev.tcx.bound_type_of(param.def_id).subst_identity()); + self.visit(self.ev.tcx.type_of(param.def_id).subst_identity()); } } GenericParamDefKind::Const { has_default } => { - self.visit(self.ev.tcx.bound_type_of(param.def_id).subst_identity()); + self.visit(self.ev.tcx.type_of(param.def_id).subst_identity()); if has_default { self.visit(self.ev.tcx.const_param_default(param.def_id).subst_identity()); } @@ -857,7 +857,7 @@ impl ReachEverythingInTheInterfaceVisitor<'_, '_> { } fn ty(&mut self) -> &mut Self { - self.visit(self.ev.tcx.bound_type_of(self.item_def_id).subst_identity()); + self.visit(self.ev.tcx.type_of(self.item_def_id).subst_identity()); self } @@ -1268,7 +1268,7 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> { // Method calls have to be checked specially. self.span = segment.ident.span; if let Some(def_id) = self.typeck_results().type_dependent_def_id(expr.hir_id) { - if self.visit(self.tcx.bound_type_of(def_id).subst_identity()).is_break() { + if self.visit(self.tcx.type_of(def_id).subst_identity()).is_break() { return; } } else { @@ -1742,12 +1742,12 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> { GenericParamDefKind::Lifetime => {} GenericParamDefKind::Type { has_default, .. } => { if has_default { - self.visit(self.tcx.bound_type_of(param.def_id).subst_identity()); + self.visit(self.tcx.type_of(param.def_id).subst_identity()); } } // FIXME(generic_const_exprs): May want to look inside const here GenericParamDefKind::Const { .. } => { - self.visit(self.tcx.bound_type_of(param.def_id).subst_identity()); + self.visit(self.tcx.type_of(param.def_id).subst_identity()); } } } @@ -1774,7 +1774,7 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> { } fn ty(&mut self) -> &mut Self { - self.visit(self.tcx.bound_type_of(self.item_def_id).subst_identity()); + self.visit(self.tcx.type_of(self.item_def_id).subst_identity()); self } |
