File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
crates/ra_project_model/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ impl ProjectWorkspace {
336
336
extern_source,
337
337
) ;
338
338
if cargo[ tgt] . kind == TargetKind :: Lib {
339
- lib_tgt = Some ( crate_id) ;
339
+ lib_tgt = Some ( ( crate_id, cargo [ tgt ] . name . clone ( ) ) ) ;
340
340
pkg_to_lib_crate. insert ( pkg, crate_id) ;
341
341
}
342
342
if cargo[ tgt] . is_proc_macro {
@@ -363,15 +363,15 @@ impl ProjectWorkspace {
363
363
364
364
// Set deps to the core, std and to the lib target of the current package
365
365
for & from in pkg_crates. get ( & pkg) . into_iter ( ) . flatten ( ) {
366
- if let Some ( to ) = lib_tgt {
366
+ if let Some ( ( to , name ) ) = lib_tgt. clone ( ) {
367
367
if to != from
368
368
&& crate_graph
369
369
. add_dep (
370
370
from,
371
371
// For root projects with dashes in their name,
372
372
// cargo metadata does not do any normalization,
373
373
// so we do it ourselves currently
374
- CrateName :: normalize_dashes ( & cargo [ pkg ] . name ) ,
374
+ CrateName :: normalize_dashes ( & name) ,
375
375
to,
376
376
)
377
377
. is_err ( )
You can’t perform that action at this time.
0 commit comments