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:?}
20862086 }
20872087
20882088 // Get paths from cmd args
2089- let paths = match & builder. config . cmd {
2089+ let mut paths = match & builder. config . cmd {
20902090 Subcommand :: Test { .. } => & builder. config . paths [ ..] ,
20912091 _ => & [ ] ,
20922092 } ;
20932093
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+ }
20942108 // Get test-args by striping suite path
20952109 let mut test_args: Vec < & str > = paths
20962110 . iter ( )
You can’t perform that action at this time.
0 commit comments