@@ -309,9 +309,9 @@ mod reexport {
309309pub fn register_pre_expansion_lints ( store : & mut rustc:: lint:: LintStore , conf : & Conf ) {
310310 store. register_pre_expansion_pass ( || box write:: Write ) ;
311311 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 ;
313313 store. register_pre_expansion_pass ( move || box non_expressive_names:: NonExpressiveNames {
314- single_char_binding_names_threshold : p ,
314+ single_char_binding_names_threshold,
315315 } ) ;
316316 store. register_pre_expansion_pass ( || box attrs:: DeprecatedCfgAttribute ) ;
317317 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
783783 store. register_late_pass ( || box enum_glob_use:: EnumGlobUse ) ;
784784 store. register_late_pass ( || box enum_clike:: UnportableVariant ) ;
785785 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 ) ) ;
788788 store. register_late_pass ( || box ptr:: Ptr ) ;
789789 store. register_late_pass ( || box needless_bool:: NeedlessBool ) ;
790790 store. register_late_pass ( || box needless_bool:: BoolComparison ) ;
@@ -812,8 +812,8 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
812812 store. register_late_pass ( || box entry:: HashMapPass ) ;
813813 store. register_late_pass ( || box ranges:: Ranges ) ;
814814 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 ) ) ;
817817 store. register_late_pass ( || box matches:: Matches ) ;
818818 store. register_late_pass ( || box minmax:: MinMaxPass ) ;
819819 store. register_late_pass ( || box open_options:: OpenOptions ) ;
@@ -825,10 +825,10 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
825825 store. register_late_pass ( || box no_effect:: NoEffect ) ;
826826 store. register_late_pass ( || box temporary_assignment:: TemporaryAssignment ) ;
827827 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} ) ;
832832 store. register_late_pass ( || box panic_unimplemented:: PanicUnimplemented ) ;
833833 store. register_late_pass ( || box strings:: StringLitAsBytes ) ;
834834 store. register_late_pass ( || box derive:: Derive ) ;
@@ -848,13 +848,13 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
848848 store. register_late_pass ( || box overflow_check_conditional:: OverflowCheckConditional ) ;
849849 store. register_late_pass ( || box unused_label:: UnusedLabel ) ;
850850 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 ( ) ) ) ;
858858 store. register_late_pass ( || box neg_multiply:: NegMultiply ) ;
859859 store. register_late_pass ( || box mem_discriminant:: MemDiscriminant ) ;
860860 store. register_late_pass ( || box mem_forget:: MemForget ) ;
@@ -869,15 +869,15 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
869869 store. register_late_pass ( || box redundant_pattern_matching:: RedundantPatternMatching ) ;
870870 store. register_late_pass ( || box partialeq_ne_impl:: PartialEqNeImpl ) ;
871871 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 ) ) ;
874874 store. register_late_pass ( || box explicit_write:: ExplicitWrite ) ;
875875 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 (
877877 conf. trivial_copy_size_limit ,
878878 & sess. target ,
879879 ) ;
880- store. register_late_pass ( move || box p ) ;
880+ store. register_late_pass ( move || box trivially_copy_pass_by_ref ) ;
881881 store. register_late_pass ( || box try_err:: TryErr ) ;
882882 store. register_late_pass ( || box use_self:: UseSelf ) ;
883883 store. register_late_pass ( || box bytecount:: ByteCount ) ;
@@ -933,11 +933,11 @@ pub fn register_plugins(store: &mut lint::LintStore, sess: &Session, conf: &Conf
933933 store. register_early_pass ( || box multiple_crate_versions:: MultipleCrateVersions ) ;
934934 store. register_early_pass ( || box wildcard_dependencies:: WildcardDependencies ) ;
935935 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 ) ) ;
938938 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 ) ) ;
941941 store. register_late_pass ( || box unused_self:: UnusedSelf ) ;
942942 store. register_late_pass ( || box mutable_debug_assertion:: DebugAssertWithMutCall ) ;
943943
0 commit comments