diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2025-03-12 10:19:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-12 10:19:26 -0700 |
| commit | f88f27aff008d0fc6be906ee7b4d1a55f8d59aef (patch) | |
| tree | 07814f454b900ec8ac01d026ce55fa643e641b22 /compiler/rustc_privacy | |
| parent | 185dd2d01b87e7122427a10dab7e1d92b6976f6c (diff) | |
| parent | 256c27e748b477c1ec1c59bdc23afade5eec84aa (diff) | |
| download | rust-f88f27aff008d0fc6be906ee7b4d1a55f8d59aef.tar.gz rust-f88f27aff008d0fc6be906ee7b4d1a55f8d59aef.zip | |
Rollup merge of #137504 - nnethercote:remove-Map-4, r=Zalathar
Move methods from Map to TyCtxt, part 4. A follow-up to https://github.com/rust-lang/rust/pull/137350. r? ```@Zalathar```
Diffstat (limited to 'compiler/rustc_privacy')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index ff203b2938e..f55fd39387a 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -493,7 +493,7 @@ impl<'tcx> EmbargoVisitor<'tcx> { ) { // Non-opaque macros cannot make other items more accessible than they already are. let hir_id = self.tcx.local_def_id_to_hir_id(local_def_id); - let attrs = self.tcx.hir().attrs(hir_id); + let attrs = self.tcx.hir_attrs(hir_id); if attr::find_attr!(attrs, AttributeKind::MacroTransparency(x) => *x) .unwrap_or(Transparency::fallback(md.macro_rules)) @@ -573,7 +573,7 @@ impl<'tcx> EmbargoVisitor<'tcx> { // have normal hygiene, so we can treat them like other items without type // privacy and mark them reachable. DefKind::Macro(_) => { - let item = self.tcx.hir().expect_item(def_id); + let item = self.tcx.hir_expect_item(def_id); if let hir::ItemKind::Macro(MacroDef { macro_rules: false, .. }, _) = item.kind { if vis.is_accessible_from(module, self.tcx) { self.update(def_id, macro_ev, Level::Reachable); @@ -597,7 +597,7 @@ impl<'tcx> EmbargoVisitor<'tcx> { DefKind::Struct | DefKind::Union => { // While structs and unions have type privacy, their fields do not. - let item = self.tcx.hir().expect_item(def_id); + let item = self.tcx.hir_expect_item(def_id); if let hir::ItemKind::Struct(ref struct_def, _) | hir::ItemKind::Union(ref struct_def, _) = item.kind { |
