File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,7 @@ fn cargo_to_crate_graph(
390390 & cfg_options,
391391 proc_macro_loader,
392392 file_id,
393+ & cargo[ tgt] . name ,
393394 ) ;
394395 if cargo[ tgt] . kind == TargetKind :: Lib {
395396 lib_tgt = Some ( ( crate_id, cargo[ tgt] . name . clone ( ) ) ) ;
@@ -505,6 +506,7 @@ fn handle_rustc_crates(
505506 & cfg_options,
506507 proc_macro_loader,
507508 file_id,
509+ & rustc_workspace[ tgt] . name ,
508510 ) ;
509511 pkg_to_lib_crate. insert ( pkg, crate_id) ;
510512 // Add dependencies on core / std / alloc for this crate
@@ -560,6 +562,7 @@ fn add_target_crate_root(
560562 cfg_options : & CfgOptions ,
561563 proc_macro_loader : & dyn Fn ( & Path ) -> Vec < ProcMacro > ,
562564 file_id : FileId ,
565+ cargo_name : & str ,
563566) -> CrateId {
564567 let edition = pkg. edition ;
565568 let cfg_options = {
@@ -586,7 +589,7 @@ fn add_target_crate_root(
586589 . map ( |it| proc_macro_loader ( & it) )
587590 . unwrap_or_default ( ) ;
588591
589- let display_name = CrateDisplayName :: from_canonical_name ( pkg . name . clone ( ) ) ;
592+ let display_name = CrateDisplayName :: from_canonical_name ( cargo_name . to_string ( ) ) ;
590593 let crate_id = crate_graph. add_crate_root (
591594 file_id,
592595 edition,
You can’t perform that action at this time.
0 commit comments