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 {
93
93
const DEFAULT : bool = true ;
94
94
95
95
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
96
- run. crate_or_deps ( "sysroot" ) . path ( "library" )
96
+ run. crate_or_deps ( "sysroot" ) . path ( "library" ) . alias ( "core" )
97
97
}
98
98
99
99
fn make_run ( run : RunConfig < ' _ > ) {
Original file line number Diff line number Diff line change @@ -574,7 +574,10 @@ impl Step for Std {
574
574
575
575
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
576
576
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 )
578
581
}
579
582
580
583
fn make_run ( run : RunConfig < ' _ > ) {
Original file line number Diff line number Diff line change @@ -367,6 +367,14 @@ struct CLIStepPath {
367
367
will_be_executed : bool ,
368
368
}
369
369
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
+
370
378
impl Debug for CLIStepPath {
371
379
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
372
380
write ! ( f, "{}" , self . path. display( ) )
Original file line number Diff line number Diff line change @@ -108,13 +108,17 @@ fn test_intersection() {
108
108
} ;
109
109
let library_set = set ( & [ "library/core" , "library/alloc" , "library/std" ] ) ;
110
110
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" ) ) ,
114
114
] ;
115
115
let subset = library_set. intersection_removing_matches ( & mut command_paths, Kind :: Build ) ;
116
116
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
+ ] ) ;
118
122
}
119
123
120
124
#[ test]
You can’t perform that action at this time.
0 commit comments