This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl Step for Std {
9393 const DEFAULT : bool = true ;
9494
9595 fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
96- run. crate_or_deps ( "sysroot" ) . path ( "library" )
96+ run. crate_or_deps ( "sysroot" ) . path ( "library" ) . alias ( "core" )
9797 }
9898
9999 fn make_run ( run : RunConfig < ' _ > ) {
Original file line number Diff line number Diff line change @@ -574,7 +574,10 @@ impl Step for Std {
574574
575575 fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
576576 let builder = run. builder ;
577- run. crate_or_deps ( "sysroot" ) . path ( "library" ) . default_condition ( builder. config . docs )
577+ run. crate_or_deps ( "sysroot" )
578+ . path ( "library" )
579+ . alias ( "core" )
580+ . default_condition ( builder. config . docs )
578581 }
579582
580583 fn make_run ( run : RunConfig < ' _ > ) {
Original file line number Diff line number Diff line change @@ -367,6 +367,14 @@ struct CLIStepPath {
367367 will_be_executed : bool ,
368368}
369369
370+ #[ cfg( test) ]
371+ impl CLIStepPath {
372+ fn will_be_executed ( mut self , will_be_executed : bool ) -> Self {
373+ self . will_be_executed = will_be_executed;
374+ self
375+ }
376+ }
377+
370378impl Debug for CLIStepPath {
371379 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
372380 write ! ( f, "{}" , self . path. display( ) )
Original file line number Diff line number Diff line change @@ -108,13 +108,17 @@ fn test_intersection() {
108108 } ;
109109 let library_set = set ( & [ "library/core" , "library/alloc" , "library/std" ] ) ;
110110 let mut command_paths = vec ! [
111- PathBuf :: from( "library/core" ) ,
112- PathBuf :: from( "library/alloc" ) ,
113- PathBuf :: from( "library/stdarch" ) ,
111+ CLIStepPath :: from ( PathBuf :: from( "library/core" ) ) ,
112+ CLIStepPath :: from ( PathBuf :: from( "library/alloc" ) ) ,
113+ CLIStepPath :: from ( PathBuf :: from( "library/stdarch" ) ) ,
114114 ] ;
115115 let subset = library_set. intersection_removing_matches ( & mut command_paths, Kind :: Build ) ;
116116 assert_eq ! ( subset, set( & [ "library/core" , "library/alloc" ] ) , ) ;
117- assert_eq ! ( command_paths, vec![ PathBuf :: from( "library/stdarch" ) ] ) ;
117+ assert_eq ! ( command_paths, vec![
118+ CLIStepPath :: from( PathBuf :: from( "library/core" ) ) . will_be_executed( true ) ,
119+ CLIStepPath :: from( PathBuf :: from( "library/alloc" ) ) . will_be_executed( true ) ,
120+ CLIStepPath :: from( PathBuf :: from( "library/stdarch" ) ) . will_be_executed( false ) ,
121+ ] ) ;
118122}
119123
120124#[ test]
You can’t perform that action at this time.
0 commit comments