@@ -717,7 +717,6 @@ fn cargo_to_crate_graph(
717
717
load_proc_macro,
718
718
& mut pkg_to_lib_crate,
719
719
& public_deps,
720
- libproc_macro,
721
720
cargo,
722
721
& pkg_crates,
723
722
build_scripts,
@@ -783,7 +782,6 @@ fn handle_rustc_crates(
783
782
load_proc_macro : & mut dyn FnMut ( & str , & AbsPath ) -> ProcMacroLoadResult ,
784
783
pkg_to_lib_crate : & mut FxHashMap < Package , CrateId > ,
785
784
public_deps : & SysrootPublicDeps ,
786
- libproc_macro : Option < CrateId > ,
787
785
cargo : & CargoWorkspace ,
788
786
pkg_crates : & FxHashMap < Package , Vec < ( CrateId , TargetKind ) > > ,
789
787
build_scripts : & WorkspaceBuildScripts ,
@@ -845,19 +843,6 @@ fn handle_rustc_crates(
845
843
rustc_workspace[ tgt] . is_proc_macro ,
846
844
) ;
847
845
pkg_to_lib_crate. insert ( pkg, crate_id) ;
848
-
849
- // Even crates that don't set proc-macro = true are allowed to depend on proc_macro
850
- // (just none of the APIs work when called outside of a proc macro).
851
- if let Some ( proc_macro) = libproc_macro {
852
- add_dep_with_prelude (
853
- crate_graph,
854
- crate_id,
855
- CrateName :: new ( "proc_macro" ) . unwrap ( ) ,
856
- proc_macro,
857
- cargo[ tgt] . is_proc_macro ,
858
- ) ;
859
- }
860
-
861
846
// Add dependencies on core / std / alloc for this crate
862
847
public_deps. add ( crate_id, crate_graph) ;
863
848
rustc_pkg_crates. entry ( pkg) . or_insert_with ( Vec :: new) . push ( crate_id) ;
0 commit comments