@@ -9,7 +9,7 @@ use serde::Deserialize;
9
9
10
10
use super :: flags:: Flags ;
11
11
use super :: { ChangeIdWrapper , Config } ;
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
@@ -306,9 +306,10 @@ fn order_of_clippy_rules() {
306
306
] ;
307
307
let config = Config :: parse ( Flags :: parse ( & args) ) ;
308
308
309
- let actual = match & config. cmd {
309
+ let actual = match config. cmd . clone ( ) {
310
310
crate :: Subcommand :: Clippy { allow, deny, warn, forbid, .. } => {
311
- get_clippy_rules_in_order ( & args, & allow, & deny, & warn, & forbid)
311
+ let cfg = LintConfig { allow, deny, warn, forbid } ;
312
+ get_clippy_rules_in_order ( & args, & cfg)
312
313
}
313
314
_ => panic ! ( "invalid subcommand" ) ,
314
315
} ;
@@ -329,9 +330,10 @@ fn clippy_rule_separate_prefix() {
329
330
vec ! [ "clippy" . to_string( ) , "-A clippy:all" . to_string( ) , "-W clippy::style" . to_string( ) ] ;
330
331
let config = Config :: parse ( Flags :: parse ( & args) ) ;
331
332
332
- let actual = match & config. cmd {
333
+ let actual = match config. cmd . clone ( ) {
333
334
crate :: Subcommand :: Clippy { allow, deny, warn, forbid, .. } => {
334
- get_clippy_rules_in_order ( & args, & allow, & deny, & warn, & forbid)
335
+ let cfg = LintConfig { allow, deny, warn, forbid } ;
336
+ get_clippy_rules_in_order ( & args, & cfg)
335
337
}
336
338
_ => panic ! ( "invalid subcommand" ) ,
337
339
} ;
0 commit comments