@@ -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;
@@ -533,8 +534,8 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
533534 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: CompilerLintFunctions :: new ( ) ) ) ;
534535 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: IfChainStyle ) ) ;
535536 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: InvalidPaths ) ) ;
536- store. register_late_pass ( || Box :: new ( utils:: internal_lints:: InterningDefinedSymbol :: default ( ) ) ) ;
537- store. register_late_pass ( || Box :: new ( utils:: internal_lints:: LintWithoutLintPass :: default ( ) ) ) ;
537+ store. register_late_pass ( || Box :: < utils:: internal_lints:: InterningDefinedSymbol > :: default ( ) ) ;
538+ store. register_late_pass ( || Box :: < utils:: internal_lints:: LintWithoutLintPass > :: default ( ) ) ;
538539 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: MatchTypeOnDiagItem ) ) ;
539540 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: OuterExpnDataPass ) ) ;
540541 store. register_late_pass ( || Box :: new ( utils:: internal_lints:: MsrvAttrImpl ) ) ;
@@ -627,10 +628,10 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
627628 msrv,
628629 ) )
629630 } ) ;
630- store. register_late_pass ( || Box :: new ( shadow:: Shadow :: default ( ) ) ) ;
631+ store. register_late_pass ( || Box :: < shadow:: Shadow > :: default ( ) ) ;
631632 store. register_late_pass ( || Box :: new ( unit_types:: UnitTypes ) ) ;
632633 store. register_late_pass ( || Box :: new ( loops:: Loops ) ) ;
633- store. register_late_pass ( || Box :: new ( main_recursion:: MainRecursion :: default ( ) ) ) ;
634+ store. register_late_pass ( || Box :: < main_recursion:: MainRecursion > :: default ( ) ) ;
634635 store. register_late_pass ( || Box :: new ( lifetimes:: Lifetimes ) ) ;
635636 store. register_late_pass ( || Box :: new ( entry:: HashMapPass ) ) ;
636637 store. register_late_pass ( || Box :: new ( minmax:: MinMaxPass ) ) ;
@@ -664,7 +665,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
664665 store. register_late_pass ( || Box :: new ( format:: UselessFormat ) ) ;
665666 store. register_late_pass ( || Box :: new ( swap:: Swap ) ) ;
666667 store. register_late_pass ( || Box :: new ( overflow_check_conditional:: OverflowCheckConditional ) ) ;
667- store. register_late_pass ( || Box :: new ( new_without_default:: NewWithoutDefault :: default ( ) ) ) ;
668+ store. register_late_pass ( || Box :: < new_without_default:: NewWithoutDefault > :: default ( ) ) ;
668669 let disallowed_names = conf. disallowed_names . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
669670 store. register_late_pass ( move || Box :: new ( disallowed_names:: DisallowedNames :: new ( disallowed_names. clone ( ) ) ) ) ;
670671 let too_many_arguments_threshold = conf. too_many_arguments_threshold ;
@@ -703,7 +704,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
703704 store. register_late_pass ( || Box :: new ( ref_option_ref:: RefOptionRef ) ) ;
704705 store. register_late_pass ( || Box :: new ( infinite_iter:: InfiniteIter ) ) ;
705706 store. register_late_pass ( || Box :: new ( inline_fn_without_body:: InlineFnWithoutBody ) ) ;
706- store. register_late_pass ( || Box :: new ( useless_conversion:: UselessConversion :: default ( ) ) ) ;
707+ store. register_late_pass ( || Box :: < useless_conversion:: UselessConversion > :: default ( ) ) ;
707708 store. register_late_pass ( || Box :: new ( implicit_hasher:: ImplicitHasher ) ) ;
708709 store. register_late_pass ( || Box :: new ( fallible_impl_from:: FallibleImplFrom ) ) ;
709710 store. register_late_pass ( || Box :: new ( question_mark:: QuestionMark ) ) ;
@@ -773,7 +774,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
773774 upper_case_acronyms_aggressive,
774775 ) )
775776 } ) ;
776- store. register_late_pass ( || Box :: new ( default:: Default :: default ( ) ) ) ;
777+ store. register_late_pass ( || Box :: < default:: Default > :: default ( ) ) ;
777778 store. register_late_pass ( move || Box :: new ( unused_self:: UnusedSelf :: new ( avoid_breaking_exported_api) ) ) ;
778779 store. register_late_pass ( || Box :: new ( mutable_debug_assertion:: DebugAssertWithMutCall ) ) ;
779780 store. register_late_pass ( || Box :: new ( exit:: Exit ) ) ;
@@ -796,7 +797,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
796797 store. register_early_pass ( || Box :: new ( option_env_unwrap:: OptionEnvUnwrap ) ) ;
797798 let warn_on_all_wildcard_imports = conf. warn_on_all_wildcard_imports ;
798799 store. register_late_pass ( move || Box :: new ( wildcard_imports:: WildcardImports :: new ( warn_on_all_wildcard_imports) ) ) ;
799- store. register_late_pass ( || Box :: new ( redundant_pub_crate:: RedundantPubCrate :: default ( ) ) ) ;
800+ store. register_late_pass ( || Box :: < redundant_pub_crate:: RedundantPubCrate > :: default ( ) ) ;
800801 store. register_late_pass ( || Box :: new ( unnamed_address:: UnnamedAddress ) ) ;
801802 store. register_late_pass ( move || Box :: new ( dereference:: Dereferencing :: new ( msrv) ) ) ;
802803 store. register_late_pass ( || Box :: new ( option_if_let_else:: OptionIfLetElse ) ) ;
@@ -814,7 +815,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
814815 } ) ;
815816 let macro_matcher = conf. standard_macro_braces . iter ( ) . cloned ( ) . collect :: < FxHashSet < _ > > ( ) ;
816817 store. register_early_pass ( move || Box :: new ( nonstandard_macro_braces:: MacroBraces :: new ( & macro_matcher) ) ) ;
817- store. register_late_pass ( || Box :: new ( macro_use:: MacroUseImports :: default ( ) ) ) ;
818+ store. register_late_pass ( || Box :: < macro_use:: MacroUseImports > :: default ( ) ) ;
818819 store. register_late_pass ( || Box :: new ( pattern_type_mismatch:: PatternTypeMismatch ) ) ;
819820 store. register_late_pass ( || Box :: new ( unwrap_in_result:: UnwrapInResult ) ) ;
820821 store. register_late_pass ( || Box :: new ( semicolon_if_nothing_returned:: SemicolonIfNothingReturned ) ) ;
@@ -827,7 +828,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
827828 store. register_late_pass ( || Box :: new ( strings:: StrToString ) ) ;
828829 store. register_late_pass ( || Box :: new ( strings:: StringToString ) ) ;
829830 store. register_late_pass ( || Box :: new ( zero_sized_map_values:: ZeroSizedMapValues ) ) ;
830- store. register_late_pass ( || Box :: new ( vec_init_then_push:: VecInitThenPush :: default ( ) ) ) ;
831+ store. register_late_pass ( || Box :: < vec_init_then_push:: VecInitThenPush > :: default ( ) ) ;
831832 store. register_late_pass ( || Box :: new ( redundant_slicing:: RedundantSlicing ) ) ;
832833 store. register_late_pass ( || Box :: new ( from_str_radix_10:: FromStrRadix10 ) ) ;
833834 store. register_late_pass ( move || Box :: new ( if_then_some_else_none:: IfThenSomeElseNone :: new ( msrv) ) ) ;
@@ -865,7 +866,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
865866 store. register_late_pass ( move || Box :: new ( manual_bits:: ManualBits :: new ( msrv) ) ) ;
866867 store. register_late_pass ( || Box :: new ( default_union_representation:: DefaultUnionRepresentation ) ) ;
867868 store. register_early_pass ( || Box :: new ( doc_link_with_quotes:: DocLinkWithQuotes ) ) ;
868- store. register_late_pass ( || Box :: new ( only_used_in_recursion:: OnlyUsedInRecursion :: default ( ) ) ) ;
869+ store. register_late_pass ( || Box :: < only_used_in_recursion:: OnlyUsedInRecursion > :: default ( ) ) ;
869870 let allow_dbg_in_tests = conf. allow_dbg_in_tests ;
870871 store. register_late_pass ( move || Box :: new ( dbg_macro:: DbgMacro :: new ( allow_dbg_in_tests) ) ) ;
871872 let cargo_ignore_publish = conf. cargo_ignore_publish ;
@@ -874,7 +875,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
874875 ignore_publish : cargo_ignore_publish,
875876 } )
876877 } ) ;
877- store. register_late_pass ( || Box :: new ( write:: Write :: default ( ) ) ) ;
878+ store. register_late_pass ( || Box :: < write:: Write > :: default ( ) ) ;
878879 store. register_early_pass ( || Box :: new ( crate_in_macro_def:: CrateInMacroDef ) ) ;
879880 store. register_early_pass ( || Box :: new ( empty_structs_with_brackets:: EmptyStructsWithBrackets ) ) ;
880881 store. register_late_pass ( || Box :: new ( unnecessary_owned_empty_strings:: UnnecessaryOwnedEmptyStrings ) ) ;
@@ -884,7 +885,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
884885 store. register_late_pass ( move || Box :: new ( large_include_file:: LargeIncludeFile :: new ( max_include_file_size) ) ) ;
885886 store. register_late_pass ( || Box :: new ( strings:: TrimSplitWhitespace ) ) ;
886887 store. register_late_pass ( || Box :: new ( rc_clone_in_vec_init:: RcCloneInVecInit ) ) ;
887- store. register_early_pass ( || Box :: new ( duplicate_mod:: DuplicateMod :: default ( ) ) ) ;
888+ store. register_early_pass ( || Box :: < duplicate_mod:: DuplicateMod > :: default ( ) ) ;
888889 store. register_early_pass ( || Box :: new ( unused_rounding:: UnusedRounding ) ) ;
889890 store. register_early_pass ( move || Box :: new ( almost_complete_letter_range:: AlmostCompleteLetterRange :: new ( msrv) ) ) ;
890891 store. register_late_pass ( || Box :: new ( swap_ptr_to_ref:: SwapPtrToRef ) ) ;
@@ -896,13 +897,14 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
896897 let verbose_bit_mask_threshold = conf. verbose_bit_mask_threshold ;
897898 store. register_late_pass ( move || Box :: new ( operators:: Operators :: new ( verbose_bit_mask_threshold) ) ) ;
898899 store. register_late_pass ( || Box :: new ( invalid_utf8_in_unchecked:: InvalidUtf8InUnchecked ) ) ;
899- store. register_late_pass ( || Box :: new ( std_instead_of_core:: StdReexports :: default ( ) ) ) ;
900+ store. register_late_pass ( || Box :: < std_instead_of_core:: StdReexports > :: default ( ) ) ;
900901 store. register_late_pass ( || Box :: new ( manual_instant_elapsed:: ManualInstantElapsed ) ) ;
901902 store. register_late_pass ( || Box :: new ( partialeq_to_none:: PartialeqToNone ) ) ;
902903 store. register_late_pass ( || Box :: new ( manual_string_new:: ManualStringNew ) ) ;
903904 store. register_late_pass ( || Box :: new ( unused_peekable:: UnusedPeekable ) ) ;
904905 store. register_early_pass ( || Box :: new ( multi_assignments:: MultiAssignments ) ) ;
905906 store. register_late_pass ( || Box :: new ( bool_to_int_with_if:: BoolToIntWithIf ) ) ;
907+ store. register_late_pass ( || Box :: new ( box_default:: BoxDefault ) ) ;
906908 // add lints here, do not remove this comment, it's used in `new_lint`
907909}
908910
0 commit comments