@@ -9,7 +9,7 @@ use serde::Deserialize;
9
9
10
10
use super :: flags:: Flags ;
11
11
use super :: { ChangeIdWrapper , Config , RUSTC_IF_UNCHANGED_ALLOWED_PATHS } ;
12
- use crate :: core:: build_steps:: clippy:: get_clippy_rules_in_order;
12
+ use crate :: core:: build_steps:: clippy:: { LintConfig , get_clippy_rules_in_order} ;
13
13
use crate :: core:: build_steps:: llvm;
14
14
use crate :: core:: config:: { LldMode , Target , TargetSelection , TomlConfig } ;
15
15
@@ -309,9 +309,10 @@ fn order_of_clippy_rules() {
309
309
] ;
310
310
let config = Config :: parse ( Flags :: parse ( & args) ) ;
311
311
312
- let actual = match & config. cmd {
312
+ let actual = match config. cmd . clone ( ) {
313
313
crate :: Subcommand :: Clippy { allow, deny, warn, forbid, .. } => {
314
- get_clippy_rules_in_order ( & args, & allow, & deny, & warn, & forbid)
314
+ let cfg = LintConfig { allow, deny, warn, forbid } ;
315
+ get_clippy_rules_in_order ( & args, & cfg)
315
316
}
316
317
_ => panic ! ( "invalid subcommand" ) ,
317
318
} ;
@@ -332,9 +333,10 @@ fn clippy_rule_separate_prefix() {
332
333
vec ! [ "clippy" . to_string( ) , "-A clippy:all" . to_string( ) , "-W clippy::style" . to_string( ) ] ;
333
334
let config = Config :: parse ( Flags :: parse ( & args) ) ;
334
335
335
- let actual = match & config. cmd {
336
+ let actual = match config. cmd . clone ( ) {
336
337
crate :: Subcommand :: Clippy { allow, deny, warn, forbid, .. } => {
337
- get_clippy_rules_in_order ( & args, & allow, & deny, & warn, & forbid)
338
+ let cfg = LintConfig { allow, deny, warn, forbid } ;
339
+ get_clippy_rules_in_order ( & args, & cfg)
338
340
}
339
341
_ => panic ! ( "invalid subcommand" ) ,
340
342
} ;
0 commit comments