@@ -181,6 +181,7 @@ mod bool_assert_comparison;
181181mod bool_to_int_with_if;
182182mod booleans;
183183mod borrow_deref_ref;
184+ mod box_default;
184185mod cargo;
185186mod casts;
186187mod checked_conversions;
@@ -536,8 +537,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
536537 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ) ;
537538 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: IfChainStyle ) ) ;
538539 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 ( ) ) ;
541542 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: MatchTypeOnDiagItem ) ) ;
542543 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: OuterExpnDataPass ) ) ;
543544 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:
630631 msrv,
631632 ) )
632633 } ) ;
633- store. register_late_pass ( || Box :: new ( shadow:: Shadow :: default ( ) ) ) ;
634+ store. register_late_pass ( || Box :: < shadow:: Shadow > :: default ( ) ) ;
634635 store. register_late_pass ( || Box :: new ( unit_types:: UnitTypes ) ) ;
635636 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 ( ) ) ;
637638 store. register_late_pass ( || Box :: new ( lifetimes:: Lifetimes ) ) ;
638639 store. register_late_pass ( || Box :: new ( entry:: HashMapPass ) ) ;
639640 store. register_late_pass ( || Box :: new ( minmax:: MinMaxPass ) ) ;
@@ -667,7 +668,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
667668 store. register_late_pass ( || Box :: new ( format:: UselessFormat ) ) ;
668669 store. register_late_pass ( || Box :: new ( swap:: Swap ) ) ;
669670 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 ( ) ) ;
671672 let disallowed_names = conf. disallowed_names . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
672673 store. register_late_pass ( move || Box :: new ( disallowed_names:: DisallowedNames :: new ( disallowed_names. clone ( ) ) ) ) ;
673674 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:
706707 store. register_late_pass ( || Box :: new ( ref_option_ref:: RefOptionRef ) ) ;
707708 store. register_late_pass ( || Box :: new ( infinite_iter:: InfiniteIter ) ) ;
708709 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 ( ) ) ;
710711 store. register_late_pass ( || Box :: new ( implicit_hasher:: ImplicitHasher ) ) ;
711712 store. register_late_pass ( || Box :: new ( fallible_impl_from:: FallibleImplFrom ) ) ;
712713 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:
776777 upper_case_acronyms_aggressive,
777778 ) )
778779 } ) ;
779- store. register_late_pass ( || Box :: new ( default:: Default :: default ( ) ) ) ;
780+ store. register_late_pass ( || Box :: < default:: Default > :: default ( ) ) ;
780781 store. register_late_pass ( move || Box :: new ( unused_self:: UnusedSelf :: new ( avoid_breaking_exported_api) ) ) ;
781782 store. register_late_pass ( || Box :: new ( mutable_debug_assertion:: DebugAssertWithMutCall ) ) ;
782783 store. register_late_pass ( || Box :: new ( exit:: Exit ) ) ;
@@ -799,7 +800,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
799800 store. register_early_pass ( || Box :: new ( option_env_unwrap:: OptionEnvUnwrap ) ) ;
800801 let warn_on_all_wildcard_imports = conf. warn_on_all_wildcard_imports ;
801802 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 ( ) ) ;
803804 store. register_late_pass ( || Box :: new ( unnamed_address:: UnnamedAddress ) ) ;
804805 store. register_late_pass ( move || Box :: new ( dereference:: Dereferencing :: new ( msrv) ) ) ;
805806 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:
817818 } ) ;
818819 let macro_matcher = conf. standard_macro_braces . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
819820 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 ( ) ) ;
821822 store. register_late_pass ( || Box :: new ( pattern_type_mismatch:: PatternTypeMismatch ) ) ;
822823 store. register_late_pass ( || Box :: new ( unwrap_in_result:: UnwrapInResult ) ) ;
823824 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:
830831 store. register_late_pass ( || Box :: new ( strings:: StrToString ) ) ;
831832 store. register_late_pass ( || Box :: new ( strings:: StringToString ) ) ;
832833 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 ( ) ) ;
834835 store. register_late_pass ( || Box :: new ( redundant_slicing:: RedundantSlicing ) ) ;
835836 store. register_late_pass ( || Box :: new ( from_str_radix_10:: FromStrRadix10 ) ) ;
836837 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:
868869 store. register_late_pass ( move || Box :: new ( manual_bits:: ManualBits :: new ( msrv) ) ) ;
869870 store. register_late_pass ( || Box :: new ( default_union_representation:: DefaultUnionRepresentation ) ) ;
870871 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 ( ) ) ;
872873 let allow_dbg_in_tests = conf. allow_dbg_in_tests ;
873874 store. register_late_pass ( move || Box :: new ( dbg_macro:: DbgMacro :: new ( allow_dbg_in_tests) ) ) ;
874875 let cargo_ignore_publish = conf. cargo_ignore_publish ;
@@ -877,7 +878,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
877878 ignore_publish : cargo_ignore_publish,
878879 } )
879880 } ) ;
880- store. register_late_pass ( || Box :: new ( write:: Write :: default ( ) ) ) ;
881+ store. register_late_pass ( || Box :: < write:: Write > :: default ( ) ) ;
881882 store. register_early_pass ( || Box :: new ( crate_in_macro_def:: CrateInMacroDef ) ) ;
882883 store. register_early_pass ( || Box :: new ( empty_structs_with_brackets:: EmptyStructsWithBrackets ) ) ;
883884 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:
887888 store. register_late_pass ( move || Box :: new ( large_include_file:: LargeIncludeFile :: new ( max_include_file_size) ) ) ;
888889 store. register_late_pass ( || Box :: new ( strings:: TrimSplitWhitespace ) ) ;
889890 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 ( ) ) ;
891892 store. register_early_pass ( || Box :: new ( unused_rounding:: UnusedRounding ) ) ;
892893 store. register_early_pass ( move || Box :: new ( almost_complete_letter_range:: AlmostCompleteLetterRange :: new ( msrv) ) ) ;
893894 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:
899900 let verbose_bit_mask_threshold = conf. verbose_bit_mask_threshold ;
900901 store. register_late_pass ( move || Box :: new ( operators:: Operators :: new ( verbose_bit_mask_threshold) ) ) ;
901902 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 ( ) ) ;
903904 store. register_late_pass ( || Box :: new ( manual_instant_elapsed:: ManualInstantElapsed ) ) ;
904905 store. register_late_pass ( || Box :: new ( partialeq_to_none:: PartialeqToNone ) ) ;
905906 store. register_late_pass ( || Box :: new ( manual_string_new:: ManualStringNew ) ) ;
906907 store. register_late_pass ( || Box :: new ( unused_peekable:: UnusedPeekable ) ) ;
907908 store. register_early_pass ( || Box :: new ( multi_assignments:: MultiAssignments ) ) ;
908909 store. register_late_pass ( || Box :: new ( bool_to_int_with_if:: BoolToIntWithIf ) ) ;
910+ store. register_late_pass ( || Box :: new ( box_default:: BoxDefault ) ) ;
909911 // add lints here, do not remove this comment, it's used in `new_lint`
910912}
911913
0 commit comments