File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2086,11 +2086,25 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}
2086
2086
}
2087
2087
2088
2088
// Get paths from cmd args
2089
- let paths = match & builder. config . cmd {
2089
+ let mut paths = match & builder. config . cmd {
2090
2090
Subcommand :: Test { .. } => & builder. config . paths [ ..] ,
2091
2091
_ => & [ ] ,
2092
2092
} ;
2093
2093
2094
+ // in rustdoc-js mode, allow filters to be rs files or js files.
2095
+ // use a late-initialized Vec to avoid cloning for other modes.
2096
+ let mut paths_v;
2097
+ if mode == "rustdoc-js" {
2098
+ paths_v = paths. to_vec ( ) ;
2099
+ for p in & mut paths_v {
2100
+ if let Some ( ext) = p. extension ( )
2101
+ && ext == "js"
2102
+ {
2103
+ p. set_extension ( "rs" ) ;
2104
+ }
2105
+ }
2106
+ paths = & paths_v;
2107
+ }
2094
2108
// Get test-args by striping suite path
2095
2109
let mut test_args: Vec < & str > = paths
2096
2110
. iter ( )
You can’t perform that action at this time.
0 commit comments