@@ -181,6 +181,7 @@ mod bool_assert_comparison;
181
181
mod bool_to_int_with_if;
182
182
mod booleans;
183
183
mod borrow_deref_ref;
184
+ mod box_default;
184
185
mod cargo;
185
186
mod casts;
186
187
mod checked_conversions;
@@ -536,8 +537,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
536
537
store. register_late_pass ( || Box :: new ( utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ) ;
537
538
store. register_late_pass ( || Box :: new ( utils:: internal_lints:: IfChainStyle ) ) ;
538
539
store. register_late_pass ( || Box :: new ( utils:: internal_lints:: InvalidPaths ) ) ;
539
- store. register_late_pass ( || Box :: new ( utils:: internal_lints:: InterningDefinedSymbol :: default ( ) ) ) ;
540
- store. register_late_pass ( || Box :: new ( utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ) ;
540
+ store. register_late_pass ( || Box :: < utils:: internal_lints:: InterningDefinedSymbol > :: default ( ) ) ;
541
+ store. register_late_pass ( || Box :: < utils:: internal_lints:: LintWithoutLintPass > :: default ( ) ) ;
541
542
store. register_late_pass ( || Box :: new ( utils:: internal_lints:: MatchTypeOnDiagItem ) ) ;
542
543
store. register_late_pass ( || Box :: new ( utils:: internal_lints:: OuterExpnDataPass ) ) ;
543
544
store. register_late_pass ( || Box :: new ( utils:: internal_lints:: MsrvAttrImpl ) ) ;
@@ -630,10 +631,10 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
630
631
msrv,
631
632
) )
632
633
} ) ;
633
- store. register_late_pass ( || Box :: new ( shadow:: Shadow :: default ( ) ) ) ;
634
+ store. register_late_pass ( || Box :: < shadow:: Shadow > :: default ( ) ) ;
634
635
store. register_late_pass ( || Box :: new ( unit_types:: UnitTypes ) ) ;
635
636
store. register_late_pass ( || Box :: new ( loops:: Loops ) ) ;
636
- store. register_late_pass ( || Box :: new ( main_recursion:: MainRecursion :: default ( ) ) ) ;
637
+ store. register_late_pass ( || Box :: < main_recursion:: MainRecursion > :: default ( ) ) ;
637
638
store. register_late_pass ( || Box :: new ( lifetimes:: Lifetimes ) ) ;
638
639
store. register_late_pass ( || Box :: new ( entry:: HashMapPass ) ) ;
639
640
store. register_late_pass ( || Box :: new ( minmax:: MinMaxPass ) ) ;
@@ -667,7 +668,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
667
668
store. register_late_pass ( || Box :: new ( format:: UselessFormat ) ) ;
668
669
store. register_late_pass ( || Box :: new ( swap:: Swap ) ) ;
669
670
store. register_late_pass ( || Box :: new ( overflow_check_conditional:: OverflowCheckConditional ) ) ;
670
- store. register_late_pass ( || Box :: new ( new_without_default:: NewWithoutDefault :: default ( ) ) ) ;
671
+ store. register_late_pass ( || Box :: < new_without_default:: NewWithoutDefault > :: default ( ) ) ;
671
672
let disallowed_names = conf. disallowed_names . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
672
673
store. register_late_pass ( move || Box :: new ( disallowed_names:: DisallowedNames :: new ( disallowed_names. clone ( ) ) ) ) ;
673
674
let too_many_arguments_threshold = conf. too_many_arguments_threshold ;
@@ -706,7 +707,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
706
707
store. register_late_pass ( || Box :: new ( ref_option_ref:: RefOptionRef ) ) ;
707
708
store. register_late_pass ( || Box :: new ( infinite_iter:: InfiniteIter ) ) ;
708
709
store. register_late_pass ( || Box :: new ( inline_fn_without_body:: InlineFnWithoutBody ) ) ;
709
- store. register_late_pass ( || Box :: new ( useless_conversion:: UselessConversion :: default ( ) ) ) ;
710
+ store. register_late_pass ( || Box :: < useless_conversion:: UselessConversion > :: default ( ) ) ;
710
711
store. register_late_pass ( || Box :: new ( implicit_hasher:: ImplicitHasher ) ) ;
711
712
store. register_late_pass ( || Box :: new ( fallible_impl_from:: FallibleImplFrom ) ) ;
712
713
store. register_late_pass ( || Box :: new ( question_mark:: QuestionMark ) ) ;
@@ -776,7 +777,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
776
777
upper_case_acronyms_aggressive,
777
778
) )
778
779
} ) ;
779
- store. register_late_pass ( || Box :: new ( default:: Default :: default ( ) ) ) ;
780
+ store. register_late_pass ( || Box :: < default:: Default > :: default ( ) ) ;
780
781
store. register_late_pass ( move || Box :: new ( unused_self:: UnusedSelf :: new ( avoid_breaking_exported_api) ) ) ;
781
782
store. register_late_pass ( || Box :: new ( mutable_debug_assertion:: DebugAssertWithMutCall ) ) ;
782
783
store. register_late_pass ( || Box :: new ( exit:: Exit ) ) ;
@@ -799,7 +800,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
799
800
store. register_early_pass ( || Box :: new ( option_env_unwrap:: OptionEnvUnwrap ) ) ;
800
801
let warn_on_all_wildcard_imports = conf. warn_on_all_wildcard_imports ;
801
802
store. register_late_pass ( move || Box :: new ( wildcard_imports:: WildcardImports :: new ( warn_on_all_wildcard_imports) ) ) ;
802
- store. register_late_pass ( || Box :: new ( redundant_pub_crate:: RedundantPubCrate :: default ( ) ) ) ;
803
+ store. register_late_pass ( || Box :: < redundant_pub_crate:: RedundantPubCrate > :: default ( ) ) ;
803
804
store. register_late_pass ( || Box :: new ( unnamed_address:: UnnamedAddress ) ) ;
804
805
store. register_late_pass ( move || Box :: new ( dereference:: Dereferencing :: new ( msrv) ) ) ;
805
806
store. register_late_pass ( || Box :: new ( option_if_let_else:: OptionIfLetElse ) ) ;
@@ -817,7 +818,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
817
818
} ) ;
818
819
let macro_matcher = conf. standard_macro_braces . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
819
820
store. register_early_pass ( move || Box :: new ( nonstandard_macro_braces:: MacroBraces :: new ( & macro_matcher) ) ) ;
820
- store. register_late_pass ( || Box :: new ( macro_use:: MacroUseImports :: default ( ) ) ) ;
821
+ store. register_late_pass ( || Box :: < macro_use:: MacroUseImports > :: default ( ) ) ;
821
822
store. register_late_pass ( || Box :: new ( pattern_type_mismatch:: PatternTypeMismatch ) ) ;
822
823
store. register_late_pass ( || Box :: new ( unwrap_in_result:: UnwrapInResult ) ) ;
823
824
store. register_late_pass ( || Box :: new ( semicolon_if_nothing_returned:: SemicolonIfNothingReturned ) ) ;
@@ -830,7 +831,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
830
831
store. register_late_pass ( || Box :: new ( strings:: StrToString ) ) ;
831
832
store. register_late_pass ( || Box :: new ( strings:: StringToString ) ) ;
832
833
store. register_late_pass ( || Box :: new ( zero_sized_map_values:: ZeroSizedMapValues ) ) ;
833
- store. register_late_pass ( || Box :: new ( vec_init_then_push:: VecInitThenPush :: default ( ) ) ) ;
834
+ store. register_late_pass ( || Box :: < vec_init_then_push:: VecInitThenPush > :: default ( ) ) ;
834
835
store. register_late_pass ( || Box :: new ( redundant_slicing:: RedundantSlicing ) ) ;
835
836
store. register_late_pass ( || Box :: new ( from_str_radix_10:: FromStrRadix10 ) ) ;
836
837
store. register_late_pass ( move || Box :: new ( if_then_some_else_none:: IfThenSomeElseNone :: new ( msrv) ) ) ;
@@ -868,7 +869,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
868
869
store. register_late_pass ( move || Box :: new ( manual_bits:: ManualBits :: new ( msrv) ) ) ;
869
870
store. register_late_pass ( || Box :: new ( default_union_representation:: DefaultUnionRepresentation ) ) ;
870
871
store. register_early_pass ( || Box :: new ( doc_link_with_quotes:: DocLinkWithQuotes ) ) ;
871
- store. register_late_pass ( || Box :: new ( only_used_in_recursion:: OnlyUsedInRecursion :: default ( ) ) ) ;
872
+ store. register_late_pass ( || Box :: < only_used_in_recursion:: OnlyUsedInRecursion > :: default ( ) ) ;
872
873
let allow_dbg_in_tests = conf. allow_dbg_in_tests ;
873
874
store. register_late_pass ( move || Box :: new ( dbg_macro:: DbgMacro :: new ( allow_dbg_in_tests) ) ) ;
874
875
let cargo_ignore_publish = conf. cargo_ignore_publish ;
@@ -877,7 +878,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
877
878
ignore_publish : cargo_ignore_publish,
878
879
} )
879
880
} ) ;
880
- store. register_late_pass ( || Box :: new ( write:: Write :: default ( ) ) ) ;
881
+ store. register_late_pass ( || Box :: < write:: Write > :: default ( ) ) ;
881
882
store. register_early_pass ( || Box :: new ( crate_in_macro_def:: CrateInMacroDef ) ) ;
882
883
store. register_early_pass ( || Box :: new ( empty_structs_with_brackets:: EmptyStructsWithBrackets ) ) ;
883
884
store. register_late_pass ( || Box :: new ( unnecessary_owned_empty_strings:: UnnecessaryOwnedEmptyStrings ) ) ;
@@ -887,7 +888,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
887
888
store. register_late_pass ( move || Box :: new ( large_include_file:: LargeIncludeFile :: new ( max_include_file_size) ) ) ;
888
889
store. register_late_pass ( || Box :: new ( strings:: TrimSplitWhitespace ) ) ;
889
890
store. register_late_pass ( || Box :: new ( rc_clone_in_vec_init:: RcCloneInVecInit ) ) ;
890
- store. register_early_pass ( || Box :: new ( duplicate_mod:: DuplicateMod :: default ( ) ) ) ;
891
+ store. register_early_pass ( || Box :: < duplicate_mod:: DuplicateMod > :: default ( ) ) ;
891
892
store. register_early_pass ( || Box :: new ( unused_rounding:: UnusedRounding ) ) ;
892
893
store. register_early_pass ( move || Box :: new ( almost_complete_letter_range:: AlmostCompleteLetterRange :: new ( msrv) ) ) ;
893
894
store. register_late_pass ( || Box :: new ( swap_ptr_to_ref:: SwapPtrToRef ) ) ;
@@ -899,13 +900,14 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
899
900
let verbose_bit_mask_threshold = conf. verbose_bit_mask_threshold ;
900
901
store. register_late_pass ( move || Box :: new ( operators:: Operators :: new ( verbose_bit_mask_threshold) ) ) ;
901
902
store. register_late_pass ( || Box :: new ( invalid_utf8_in_unchecked:: InvalidUtf8InUnchecked ) ) ;
902
- store. register_late_pass ( || Box :: new ( std_instead_of_core:: StdReexports :: default ( ) ) ) ;
903
+ store. register_late_pass ( || Box :: < std_instead_of_core:: StdReexports > :: default ( ) ) ;
903
904
store. register_late_pass ( || Box :: new ( manual_instant_elapsed:: ManualInstantElapsed ) ) ;
904
905
store. register_late_pass ( || Box :: new ( partialeq_to_none:: PartialeqToNone ) ) ;
905
906
store. register_late_pass ( || Box :: new ( manual_string_new:: ManualStringNew ) ) ;
906
907
store. register_late_pass ( || Box :: new ( unused_peekable:: UnusedPeekable ) ) ;
907
908
store. register_early_pass ( || Box :: new ( multi_assignments:: MultiAssignments ) ) ;
908
909
store. register_late_pass ( || Box :: new ( bool_to_int_with_if:: BoolToIntWithIf ) ) ;
910
+ store. register_late_pass ( || Box :: new ( box_default:: BoxDefault ) ) ;
909
911
// add lints here, do not remove this comment, it's used in `new_lint`
910
912
}
911
913
0 commit comments