@@ -4,7 +4,7 @@ use paths::Utf8Path;
44use rustc_hash:: FxHashMap ;
55use toolchain:: Tool ;
66
7- use crate :: { utf8_stdout, CargoWorkspace , ManifestPath , PackageData , Sysroot , TargetKind } ;
7+ use crate :: { utf8_stdout, ManifestPath , PackageData , Sysroot , TargetKind } ;
88
99/// Recreates the compile-time environment variables that Cargo sets.
1010///
@@ -51,23 +51,13 @@ pub(crate) fn inject_cargo_env(env: &mut Env) {
5151 env. set ( "CARGO" , Tool :: Cargo . path ( ) . to_string ( ) ) ;
5252}
5353
54- pub ( crate ) fn inject_rustc_tool_env (
55- env : & mut Env ,
56- cargo : & CargoWorkspace ,
57- cargo_name : & str ,
58- kind : TargetKind ,
59- ) {
54+ pub ( crate ) fn inject_rustc_tool_env ( env : & mut Env , cargo_name : & str , kind : TargetKind ) {
6055 _ = kind;
6156 // FIXME
6257 // if kind.is_executable() {
6358 // env.set("CARGO_BIN_NAME", cargo_name);
6459 // }
6560 env. set ( "CARGO_CRATE_NAME" , cargo_name. replace ( '-' , "_" ) ) ;
66- // NOTE: Technically we should set this for all crates, but that will worsen the deduplication
67- // logic so for now just keeping it proc-macros ought to be fine.
68- if kind. is_proc_macro ( ) {
69- env. set ( "CARGO_RUSTC_CURRENT_DIR" , cargo. manifest_path ( ) . parent ( ) . to_string ( ) ) ;
70- }
7161}
7262
7363pub ( crate ) fn cargo_config_env (
0 commit comments