File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -453,6 +453,9 @@ fn cargo_to_crate_graph(
453
453
let mut queue = VecDeque :: new ( ) ;
454
454
queue. push_back ( root_pkg) ;
455
455
while let Some ( pkg) = queue. pop_front ( ) {
456
+ if rustc_pkg_crates. contains_key ( & pkg) {
457
+ continue ;
458
+ }
456
459
for dep in & rustc_workspace[ pkg] . dependencies {
457
460
queue. push_back ( dep. pkg ) ;
458
461
}
@@ -481,7 +484,7 @@ fn cargo_to_crate_graph(
481
484
}
482
485
// Now add a dep edge from all targets of upstream to the lib
483
486
// target of downstream.
484
- for pkg in rustc_workspace . packages ( ) {
487
+ for pkg in rustc_pkg_crates . keys ( ) . copied ( ) {
485
488
for dep in rustc_workspace[ pkg] . dependencies . iter ( ) {
486
489
let name = CrateName :: new ( & dep. name ) . unwrap ( ) ;
487
490
if let Some ( & to) = pkg_to_lib_crate. get ( & dep. pkg ) {
@@ -519,6 +522,8 @@ fn cargo_to_crate_graph(
519
522
}
520
523
}
521
524
}
525
+ } else {
526
+ eprintln ! ( "No cargo workspace" ) ;
522
527
}
523
528
crate_graph
524
529
}
You can’t perform that action at this time.
0 commit comments