@@ -309,9 +309,9 @@ mod reexport {
309
309
pub fn register_pre_expansion_lints ( store : & mut rustc:: lint:: LintStore , conf : & Conf ) {
310
310
store. register_pre_expansion_pass ( || box write:: Write ) ;
311
311
store. register_pre_expansion_pass ( || box redundant_field_names:: RedundantFieldNames ) ;
312
- let p = conf. single_char_binding_names_threshold ;
312
+ let single_char_binding_names_threshold = conf. single_char_binding_names_threshold ;
313
313
store. register_pre_expansion_pass ( move || box non_expressive_names:: NonExpressiveNames {
314
- single_char_binding_names_threshold : p ,
314
+ single_char_binding_names_threshold,
315
315
} ) ;
316
316
store. register_pre_expansion_pass ( || box attrs:: DeprecatedCfgAttribute ) ;
317
317
store. register_pre_expansion_pass ( || box dbg_macro:: DbgMacro ) ;
@@ -783,8 +783,8 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
783
783
store. register_late_pass ( || box enum_glob_use:: EnumGlobUse ) ;
784
784
store. register_late_pass ( || box enum_clike:: UnportableVariant ) ;
785
785
store. register_late_pass ( || box excessive_precision:: ExcessivePrecision ) ;
786
- let p = conf. verbose_bit_mask_threshold ;
787
- store. register_late_pass ( move || box bit_mask:: BitMask :: new ( p ) ) ;
786
+ let verbose_bit_mask_threshold = conf. verbose_bit_mask_threshold ;
787
+ store. register_late_pass ( move || box bit_mask:: BitMask :: new ( verbose_bit_mask_threshold ) ) ;
788
788
store. register_late_pass ( || box ptr:: Ptr ) ;
789
789
store. register_late_pass ( || box needless_bool:: NeedlessBool ) ;
790
790
store. register_late_pass ( || box needless_bool:: BoolComparison ) ;
@@ -812,8 +812,8 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
812
812
store. register_late_pass ( || box entry:: HashMapPass ) ;
813
813
store. register_late_pass ( || box ranges:: Ranges ) ;
814
814
store. register_late_pass ( || box types:: Casts ) ;
815
- let p = conf. type_complexity_threshold ;
816
- store. register_late_pass ( move || box types:: TypeComplexity :: new ( p ) ) ;
815
+ let type_complexity_threshold = conf. type_complexity_threshold ;
816
+ store. register_late_pass ( move || box types:: TypeComplexity :: new ( type_complexity_threshold ) ) ;
817
817
store. register_late_pass ( || box matches:: Matches ) ;
818
818
store. register_late_pass ( || box minmax:: MinMaxPass ) ;
819
819
store. register_late_pass ( || box open_options:: OpenOptions ) ;
@@ -825,10 +825,10 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
825
825
store. register_late_pass ( || box no_effect:: NoEffect ) ;
826
826
store. register_late_pass ( || box temporary_assignment:: TemporaryAssignment ) ;
827
827
store. register_late_pass ( || box transmute:: Transmute ) ;
828
- let p = conf. cognitive_complexity_threshold ;
829
- store. register_late_pass ( move || box cognitive_complexity:: CognitiveComplexity :: new ( p ) ) ;
830
- let a = conf. too_large_for_stack ;
831
- store. register_late_pass ( move || box escape:: BoxedLocal { too_large_for_stack : a } ) ;
828
+ let cognitive_complexity_threshold = conf. cognitive_complexity_threshold ;
829
+ store. register_late_pass ( move || box cognitive_complexity:: CognitiveComplexity :: new ( cognitive_complexity_threshold ) ) ;
830
+ let too_large_for_stack = conf. too_large_for_stack ;
831
+ store. register_late_pass ( move || box escape:: BoxedLocal { too_large_for_stack} ) ;
832
832
store. register_late_pass ( || box panic_unimplemented:: PanicUnimplemented ) ;
833
833
store. register_late_pass ( || box strings:: StringLitAsBytes ) ;
834
834
store. register_late_pass ( || box derive:: Derive ) ;
@@ -848,13 +848,13 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
848
848
store. register_late_pass ( || box overflow_check_conditional:: OverflowCheckConditional ) ;
849
849
store. register_late_pass ( || box unused_label:: UnusedLabel ) ;
850
850
store. register_late_pass ( || box new_without_default:: NewWithoutDefault :: default ( ) ) ;
851
- let p = conf. blacklisted_names . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
852
- store. register_late_pass ( move || box blacklisted_name:: BlacklistedName :: new ( p . clone ( ) ) ) ;
853
- let a1 = conf. too_many_arguments_threshold ;
854
- let a2 = conf. too_many_lines_threshold ;
855
- store. register_late_pass ( move || box functions:: Functions :: new ( a1 , a2 ) ) ;
856
- let p = conf. doc_valid_idents . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
857
- store. register_late_pass ( move || box doc:: DocMarkdown :: new ( p . clone ( ) ) ) ;
851
+ let blacklisted_names = conf. blacklisted_names . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
852
+ store. register_late_pass ( move || box blacklisted_name:: BlacklistedName :: new ( blacklisted_names . clone ( ) ) ) ;
853
+ let too_many_arguments_threshold1 = conf. too_many_arguments_threshold ;
854
+ let too_many_lines_threshold2 = conf. too_many_lines_threshold ;
855
+ store. register_late_pass ( move || box functions:: Functions :: new ( too_many_arguments_threshold1 , too_many_lines_threshold2 ) ) ;
856
+ let doc_valid_idents = conf. doc_valid_idents . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
857
+ store. register_late_pass ( move || box doc:: DocMarkdown :: new ( doc_valid_idents . clone ( ) ) ) ;
858
858
store. register_late_pass ( || box neg_multiply:: NegMultiply ) ;
859
859
store. register_late_pass ( || box mem_discriminant:: MemDiscriminant ) ;
860
860
store. register_late_pass ( || box mem_forget:: MemForget ) ;
@@ -869,15 +869,15 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
869
869
store. register_late_pass ( || box redundant_pattern_matching:: RedundantPatternMatching ) ;
870
870
store. register_late_pass ( || box partialeq_ne_impl:: PartialEqNeImpl ) ;
871
871
store. register_late_pass ( || box unused_io_amount:: UnusedIoAmount ) ;
872
- let p = conf. enum_variant_size_threshold ;
873
- store. register_late_pass ( move || box large_enum_variant:: LargeEnumVariant :: new ( p ) ) ;
872
+ let enum_variant_size_threshold = conf. enum_variant_size_threshold ;
873
+ store. register_late_pass ( move || box large_enum_variant:: LargeEnumVariant :: new ( enum_variant_size_threshold ) ) ;
874
874
store. register_late_pass ( || box explicit_write:: ExplicitWrite ) ;
875
875
store. register_late_pass ( || box needless_pass_by_value:: NeedlessPassByValue ) ;
876
- let p = trivially_copy_pass_by_ref:: TriviallyCopyPassByRef :: new (
876
+ let trivially_copy_pass_by_ref = trivially_copy_pass_by_ref:: TriviallyCopyPassByRef :: new (
877
877
conf. trivial_copy_size_limit ,
878
878
& sess. target ,
879
879
) ;
880
- store. register_late_pass ( move || box p ) ;
880
+ store. register_late_pass ( move || box trivially_copy_pass_by_ref ) ;
881
881
store. register_late_pass ( || box try_err:: TryErr ) ;
882
882
store. register_late_pass ( || box use_self:: UseSelf ) ;
883
883
store. register_late_pass ( || box bytecount:: ByteCount ) ;
@@ -933,11 +933,11 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
933
933
store. register_early_pass ( || box multiple_crate_versions:: MultipleCrateVersions ) ;
934
934
store. register_early_pass ( || box wildcard_dependencies:: WildcardDependencies ) ;
935
935
store. register_early_pass ( || box literal_representation:: LiteralDigitGrouping ) ;
936
- let p = conf. literal_representation_threshold ;
937
- store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( p ) ) ;
936
+ let literal_representation_threshold = conf. literal_representation_threshold ;
937
+ store. register_early_pass ( move || box literal_representation:: DecimalLiteralRepresentation :: new ( literal_representation_threshold ) ) ;
938
938
store. register_early_pass ( || box utils:: internal_lints:: ClippyLintsInternal ) ;
939
- let p = conf. enum_variant_name_threshold ;
940
- store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( p ) ) ;
939
+ let enum_variant_name_threshold = conf. enum_variant_name_threshold ;
940
+ store. register_early_pass ( move || box enum_variants:: EnumVariantNames :: new ( enum_variant_name_threshold ) ) ;
941
941
store. register_late_pass ( || box unused_self:: UnusedSelf ) ;
942
942
store. register_late_pass ( || box mutable_debug_assertion:: DebugAssertWithMutCall ) ;
943
943
0 commit comments