diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-05-19 13:24:54 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-19 13:24:54 +1000 |
| commit | 599b08ada818de617fc565d3aa3afff3a210bb4d (patch) | |
| tree | e5d4673988eade7fe0063ee765f9bd9591d65e90 /compiler/rustc_privacy/src | |
| parent | 0513e3b46307d9bd50d8d943e350f2294b9478f3 (diff) | |
| parent | 178e09ed3705ee7eed64cfecb02173e9f54d82b0 (diff) | |
| download | rust-599b08ada818de617fc565d3aa3afff3a210bb4d.tar.gz rust-599b08ada818de617fc565d3aa3afff3a210bb4d.zip | |
Rollup merge of #140874 - mejrs:rads, r=WaffleLapkin
make `rustc_attr_parsing` less dominant in the rustc crate graph It has/had a glob re-export of `rustc_attr_data_structures`, which is a crate much lower in the graph, and a lot of crates were using it *just* (or *mostly*) for that re-export, while they can rely on `rustc_attr_data_structures` directly. Previous graph:  Graph with this PR:  The first commit keeps the re-export, and just changes the dependency if possible. The second commit is the "breaking change" which removes the re-export, and "explicitly" adds the `rustc_attr_data_structures` dependency where needed. It also switches over some src/tools/*. The second commit is actually a lot more involved than I expected. Please let me know if it's a better idea to back it out and just keep the first commit.
Diffstat (limited to 'compiler/rustc_privacy/src')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 9c2921cd5b2..e2dfaec61b3 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -20,7 +20,6 @@ use errors::{ }; use rustc_ast::MacroDef; use rustc_ast::visit::{VisitorResult, try_visit}; -use rustc_attr_parsing::AttributeKind; use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::intern::Interned; use rustc_errors::{MultiSpan, listify}; @@ -40,7 +39,7 @@ use rustc_session::lint; use rustc_span::hygiene::Transparency; use rustc_span::{Ident, Span, Symbol, sym}; use tracing::debug; -use {rustc_attr_parsing as attr, rustc_hir as hir}; +use {rustc_attr_data_structures as attrs, rustc_hir as hir}; rustc_fluent_macro::fluent_messages! { "../messages.ftl" } @@ -497,7 +496,7 @@ impl<'tcx> EmbargoVisitor<'tcx> { let hir_id = self.tcx.local_def_id_to_hir_id(local_def_id); let attrs = self.tcx.hir_attrs(hir_id); - if attr::find_attr!(attrs, AttributeKind::MacroTransparency(x) => *x) + if attrs::find_attr!(attrs, attrs::AttributeKind::MacroTransparency(x) => *x) .unwrap_or(Transparency::fallback(md.macro_rules)) != Transparency::Opaque { |
