@@ -11,28 +11,23 @@ fn config() -> Config {
11
11
// Make this an empty string, because `bevy_lint_driver` does not currently support the
12
12
// `--version` flag, which is required to auto-discover the host.
13
13
host : Some ( String :: new ( ) ) ,
14
- program : {
15
- let mut p = CommandBuilder :: rustc ( ) ;
16
-
17
- // Switch from raw `rustc` calls to `rustup run TOOLCHAIN bevy_lint_driver`.
18
- p. program = PathBuf :: from ( "rustup" ) ;
19
-
20
- p. args = [
21
- "run" ,
22
- "nightly-2024-08-21" ,
23
- "../target/debug/bevy_lint_driver" ,
24
- "rustc" ,
25
- "--error-format=json" ,
14
+ program : CommandBuilder {
15
+ program : "rustup" . into ( ) ,
16
+ args : vec ! [
17
+ "run" . into( ) ,
18
+ "nightly-2024-08-21" . into( ) ,
19
+ "../target/debug/bevy_lint_driver" . into( ) ,
20
+ "rustc" . into( ) ,
21
+ "--error-format=json" . into( ) ,
26
22
// This allows examples to `use bevy;`.
27
- "-L" ,
28
- "all=../target/debug/deps" ,
29
- "--extern=bevy" ,
30
- ]
31
- . into_iter ( )
32
- . map ( OsString :: from)
33
- . collect ( ) ;
34
-
35
- p
23
+ "-L" . into( ) ,
24
+ "all=../target/debug/deps" . into( ) ,
25
+ "--extern=bevy" . into( ) ,
26
+ ] ,
27
+ out_dir_flag : Some ( "--out-dir" . into ( ) ) ,
28
+ input_file_flag : None ,
29
+ envs : Vec :: new ( ) ,
30
+ cfg_flag : Some ( "--print=cfg" . into ( ) ) ,
36
31
} ,
37
32
out_dir : PathBuf :: from ( "../target/ui" ) ,
38
33
..Config :: rustc ( "tests/ui" )
0 commit comments