@@ -72,7 +72,7 @@ impl MiriEnv {
72
72
}
73
73
74
74
impl Command {
75
- fn auto_actions ( ) -> Result < ( ) > {
75
+ fn auto_actions ( features : Vec < String > ) -> Result < ( ) > {
76
76
if env:: var_os ( "MIRI_AUTO_OPS" ) . is_some_and ( |x| x == "no" ) {
77
77
return Ok ( ( ) ) ;
78
78
}
@@ -91,7 +91,7 @@ impl Command {
91
91
Self :: fmt ( vec ! [ ] ) ?;
92
92
}
93
93
if auto_clippy {
94
- Self :: clippy ( vec ! [ ] ) ?;
94
+ Self :: clippy ( features , vec ! [ ] ) ?;
95
95
}
96
96
97
97
Ok ( ( ) )
@@ -160,14 +160,14 @@ impl Command {
160
160
pub fn exec ( self ) -> Result < ( ) > {
161
161
// First, and crucially only once, run the auto-actions -- but not for all commands.
162
162
match & self {
163
- Command :: Install { .. }
164
- | Command :: Build { .. }
165
- | Command :: Check { .. }
166
- | Command :: Test { .. }
167
- | Command :: Run { .. }
168
- | Command :: Fmt { .. }
169
- | Command :: Doc { .. }
170
- | Command :: Clippy { .. } => Self :: auto_actions ( ) ?,
163
+ Command :: Install { features , .. }
164
+ | Command :: Build { features , .. }
165
+ | Command :: Check { features , .. }
166
+ | Command :: Test { features , .. }
167
+ | Command :: Run { features , .. }
168
+ | Command :: Doc { features , .. }
169
+ | Command :: Clippy { features , .. } => Self :: auto_actions ( features . clone ( ) ) ? ,
170
+ | Command :: Fmt { .. } => Self :: auto_actions ( vec ! [ ] ) ?,
171
171
| Command :: Toolchain { .. }
172
172
| Command :: Bench { .. }
173
173
| Command :: RustcPull { .. }
@@ -179,13 +179,13 @@ impl Command {
179
179
Command :: Install { features, flags } => Self :: install ( features, flags) ,
180
180
Command :: Build { features, flags } => Self :: build ( features, flags) ,
181
181
Command :: Check { features, flags } => Self :: check ( features, flags) ,
182
- Command :: Test { bless, flags , target, coverage, features } =>
183
- Self :: test ( bless, flags , target, coverage, features) ,
182
+ Command :: Test { bless, target, coverage, features, flags } =>
183
+ Self :: test ( bless, target, coverage, features, flags ) ,
184
184
Command :: Run { dep, verbose, target, edition, features, flags } =>
185
185
Self :: run ( dep, verbose, target, edition, features, flags) ,
186
186
Command :: Doc { features, flags } => Self :: doc ( features, flags) ,
187
187
Command :: Fmt { flags } => Self :: fmt ( flags) ,
188
- Command :: Clippy { flags } => Self :: clippy ( flags) ,
188
+ Command :: Clippy { features , flags } => Self :: clippy ( features , flags) ,
189
189
Command :: Bench { target, no_install, save_baseline, load_baseline, benches } =>
190
190
Self :: bench ( target, no_install, save_baseline, load_baseline, benches) ,
191
191
Command :: Toolchain { flags } => Self :: toolchain ( flags) ,
@@ -630,20 +630,20 @@ impl Command {
630
630
Ok ( ( ) )
631
631
}
632
632
633
- fn clippy ( flags : Vec < String > ) -> Result < ( ) > {
633
+ fn clippy ( features : Vec < String > , flags : Vec < String > ) -> Result < ( ) > {
634
634
let e = MiriEnv :: new ( ) ?;
635
- e. clippy ( "." , & flags) ?;
636
- e. clippy ( "cargo-miri" , & flags) ?;
637
- e. clippy ( "miri-script" , & flags) ?;
635
+ e. clippy ( "." , & features , & flags) ?;
636
+ e. clippy ( "cargo-miri" , & [ ] , & flags) ?;
637
+ e. clippy ( "miri-script" , & [ ] , & flags) ?;
638
638
Ok ( ( ) )
639
639
}
640
640
641
641
fn test (
642
642
bless : bool ,
643
- mut flags : Vec < String > ,
644
643
target : Option < String > ,
645
644
coverage : bool ,
646
645
features : Vec < String > ,
646
+ mut flags : Vec < String > ,
647
647
) -> Result < ( ) > {
648
648
let mut e = MiriEnv :: new ( ) ?;
649
649
@@ -674,7 +674,7 @@ impl Command {
674
674
675
675
// Then test, and let caller control flags.
676
676
// Only in root project as `cargo-miri` has no tests.
677
- e. test ( "." , & flags) ?;
677
+ e. test ( "." , & features , & flags) ?;
678
678
679
679
if let Some ( coverage) = & coverage {
680
680
coverage. show_coverage_report ( & e, & features) ?;
0 commit comments