@@ -9,7 +9,7 @@ use serde::Deserialize;
99
1010use super :: flags:: Flags ;
1111use 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} ;
1313use crate :: core:: build_steps:: llvm;
1414use crate :: core:: config:: { LldMode , Target , TargetSelection , TomlConfig } ;
1515
@@ -309,9 +309,10 @@ fn order_of_clippy_rules() {
309309 ] ;
310310 let config = Config :: parse ( Flags :: parse ( & args) ) ;
311311
312- let actual = match & config. cmd {
312+ let actual = match config. cmd . clone ( ) {
313313 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)
315316 }
316317 _ => panic ! ( "invalid subcommand" ) ,
317318 } ;
@@ -332,9 +333,10 @@ fn clippy_rule_separate_prefix() {
332333 vec ! [ "clippy" . to_string( ) , "-A clippy:all" . to_string( ) , "-W clippy::style" . to_string( ) ] ;
333334 let config = Config :: parse ( Flags :: parse ( & args) ) ;
334335
335- let actual = match & config. cmd {
336+ let actual = match config. cmd . clone ( ) {
336337 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)
338340 }
339341 _ => panic ! ( "invalid subcommand" ) ,
340342 } ;
0 commit comments