Skip to content

Commit e58e697

Browse files
authored
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_1](https://github.com/user-attachments/assets/f4a5f13c-4222-4903-b56d-28c83511fcbd) Graph with this PR: ![graph_2](https://github.com/user-attachments/assets/1e053d9c-75cc-402b-84df-86229c98277a) 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.
2 parents 3cec08a + f36e8f5 commit e58e697

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
use gccjit::FnAttribute;
33
use gccjit::Function;
44
#[cfg(feature = "master")]
5-
use rustc_attr_parsing::InlineAttr;
6-
use rustc_attr_parsing::InstructionSetAttr;
5+
use rustc_attr_data_structures::InlineAttr;
6+
use rustc_attr_data_structures::InstructionSetAttr;
77
#[cfg(feature = "master")]
88
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
99
#[cfg(feature = "master")]

src/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub fn get_fn<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, instance: Instance<'tcx>)
106106
// This is a monomorphization of a generic function.
107107
if !(cx.tcx.sess.opts.share_generics()
108108
|| tcx.codegen_fn_attrs(instance_def_id).inline
109-
== rustc_attr_parsing::InlineAttr::Never)
109+
== rustc_attr_data_structures::InlineAttr::Never)
110110
{
111111
// When not sharing generics, all instances are in the same
112112
// crate and have hidden visibility.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern crate tracing;
3737
extern crate rustc_abi;
3838
extern crate rustc_apfloat;
3939
extern crate rustc_ast;
40-
extern crate rustc_attr_parsing;
40+
extern crate rustc_attr_data_structures;
4141
extern crate rustc_codegen_ssa;
4242
extern crate rustc_data_structures;
4343
extern crate rustc_errors;

0 commit comments

Comments
 (0)