@@ -9,7 +9,7 @@ use serde::Deserialize;
99
1010use super :: flags:: Flags ;
1111use 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} ;
1313use crate :: core:: build_steps:: llvm;
1414use crate :: core:: config:: { LldMode , Target , TargetSelection , TomlConfig } ;
1515
@@ -306,9 +306,10 @@ fn order_of_clippy_rules() {
306306 ] ;
307307 let config = Config :: parse ( Flags :: parse ( & args) ) ;
308308
309- let actual = match & config. cmd {
309+ let actual = match config. cmd . clone ( ) {
310310 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)
312313 }
313314 _ => panic ! ( "invalid subcommand" ) ,
314315 } ;
@@ -329,9 +330,10 @@ fn clippy_rule_separate_prefix() {
329330 vec ! [ "clippy" . to_string( ) , "-A clippy:all" . to_string( ) , "-W clippy::style" . to_string( ) ] ;
330331 let config = Config :: parse ( Flags :: parse ( & args) ) ;
331332
332- let actual = match & config. cmd {
333+ let actual = match config. cmd . clone ( ) {
333334 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)
335337 }
336338 _ => panic ! ( "invalid subcommand" ) ,
337339 } ;
0 commit comments