File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 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 {
554554 let paths = builder
555555 . paths
556556 . 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"
564560 } )
565561 . collect :: < Vec < _ > > ( ) ;
566562
@@ -621,16 +617,17 @@ impl Step for Rustc {
621617 ) ;
622618 }
623619 } 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 ( ) {
626622 builder. info ( & format ! (
627- "\t skipping - compiler/ {} (unknown compiler crate)" ,
628- root_crate
623+ "\t skipping - {} (unknown compiler crate)" ,
624+ root_crate_path . display ( )
629625 ) ) ;
630626 } else {
627+ let root_crate = builder. crate_paths [ root_crate_path] ;
631628 compiler_crates. extend (
632629 builder
633- . in_tree_crates ( root_crate, Some ( target) )
630+ . in_tree_crates ( & root_crate, Some ( target) )
634631 . into_iter ( )
635632 . map ( |krate| krate. name ) ,
636633 ) ;
You can’t perform that action at this time.
0 commit comments