File tree 1 file changed +9
-12
lines changed
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -554,13 +554,9 @@ impl Step for Rustc {
554
554
let paths = builder
555
555
. paths
556
556
. iter ( )
557
- . map ( components_simplified)
558
- . filter_map ( |path| {
559
- if path. get ( 0 ) == Some ( & "compiler" ) {
560
- path. get ( 1 ) . map ( |p| p. to_owned ( ) )
561
- } else {
562
- None
563
- }
557
+ . filter ( |path| {
558
+ let components = components_simplified ( path) ;
559
+ components. len ( ) >= 2 && components[ 0 ] == "compiler"
564
560
} )
565
561
. collect :: < Vec < _ > > ( ) ;
566
562
@@ -621,16 +617,17 @@ impl Step for Rustc {
621
617
) ;
622
618
}
623
619
} else {
624
- for root_crate in paths {
625
- if !builder . src . join ( "compiler" ) . join ( & root_crate ) . exists ( ) {
620
+ for root_crate_path in paths {
621
+ if !root_crate_path . exists ( ) {
626
622
builder. info ( & format ! (
627
- "\t skipping - compiler/ {} (unknown compiler crate)" ,
628
- root_crate
623
+ "\t skipping - {} (unknown compiler crate)" ,
624
+ root_crate_path . display ( )
629
625
) ) ;
630
626
} else {
627
+ let root_crate = builder. crate_paths [ root_crate_path] ;
631
628
compiler_crates. extend (
632
629
builder
633
- . in_tree_crates ( root_crate, Some ( target) )
630
+ . in_tree_crates ( & root_crate, Some ( target) )
634
631
. into_iter ( )
635
632
. map ( |krate| krate. name ) ,
636
633
) ;
You can’t perform that action at this time.
0 commit comments