3030#![ feature( rustdoc_internals) ]
3131#![ feature( array_windows) ]
3232#![ feature( box_patterns) ]
33+ #![ feature( box_into_inner) ]
3334#![ feature( control_flow_enum) ]
3435#![ feature( extract_if) ]
3536#![ feature( if_let_guard) ]
@@ -136,6 +137,9 @@ pub fn provide(providers: &mut Providers) {
136137}
137138
138139fn lint_mod ( tcx : TyCtxt < ' _ > , module_def_id : LocalModDefId ) {
140+ if let Some ( lint_cap) = tcx. sess . opts . lint_cap && lint_cap == Level :: Allow {
141+ return ;
142+ }
139143 late_lint_mod ( tcx, module_def_id, BuiltinCombinedModuleLateLintPass :: new ( ) ) ;
140144}
141145
@@ -154,15 +158,15 @@ early_lint_methods!(
154158 [
155159 pub BuiltinCombinedEarlyLintPass ,
156160 [
157- UnusedParens : UnusedParens :: new ( ) ,
161+ UnusedParens : UnusedParens :: default ( ) ,
158162 UnusedBraces : UnusedBraces ,
159163 UnusedImportBraces : UnusedImportBraces ,
160164 UnsafeCode : UnsafeCode ,
161165 SpecialModuleName : SpecialModuleName ,
162166 AnonymousParameters : AnonymousParameters ,
163167 EllipsisInclusiveRangePatterns : EllipsisInclusiveRangePatterns :: default ( ) ,
164168 NonCamelCaseTypes : NonCamelCaseTypes ,
165- DeprecatedAttr : DeprecatedAttr :: new ( ) ,
169+ DeprecatedAttr : DeprecatedAttr :: default ( ) ,
166170 WhileTrue : WhileTrue ,
167171 NonAsciiIdents : NonAsciiIdents ,
168172 HiddenUnicodeCodepoints : HiddenUnicodeCodepoints ,
@@ -542,23 +546,23 @@ fn register_builtins(store: &mut LintStore) {
542546}
543547
544548fn register_internals ( store : & mut LintStore ) {
545- store. register_lints ( & LintPassImpl :: get_lints ( ) ) ;
549+ store. register_lints ( & LintPassImpl :: default ( ) . get_lints ( ) ) ;
546550 store. register_early_pass ( || Box :: new ( LintPassImpl ) ) ;
547- store. register_lints ( & DefaultHashTypes :: get_lints ( ) ) ;
551+ store. register_lints ( & DefaultHashTypes :: default ( ) . get_lints ( ) ) ;
548552 store. register_late_mod_pass ( |_| Box :: new ( DefaultHashTypes ) ) ;
549- store. register_lints ( & QueryStability :: get_lints ( ) ) ;
553+ store. register_lints ( & QueryStability :: default ( ) . get_lints ( ) ) ;
550554 store. register_late_mod_pass ( |_| Box :: new ( QueryStability ) ) ;
551- store. register_lints ( & ExistingDocKeyword :: get_lints ( ) ) ;
555+ store. register_lints ( & ExistingDocKeyword :: default ( ) . get_lints ( ) ) ;
552556 store. register_late_mod_pass ( |_| Box :: new ( ExistingDocKeyword ) ) ;
553- store. register_lints ( & TyTyKind :: get_lints ( ) ) ;
557+ store. register_lints ( & TyTyKind :: default ( ) . get_lints ( ) ) ;
554558 store. register_late_mod_pass ( |_| Box :: new ( TyTyKind ) ) ;
555- store. register_lints ( & Diagnostics :: get_lints ( ) ) ;
559+ store. register_lints ( & Diagnostics :: default ( ) . get_lints ( ) ) ;
556560 store. register_late_mod_pass ( |_| Box :: new ( Diagnostics ) ) ;
557- store. register_lints ( & BadOptAccess :: get_lints ( ) ) ;
561+ store. register_lints ( & BadOptAccess :: default ( ) . get_lints ( ) ) ;
558562 store. register_late_mod_pass ( |_| Box :: new ( BadOptAccess ) ) ;
559- store. register_lints ( & PassByValue :: get_lints ( ) ) ;
563+ store. register_lints ( & PassByValue :: default ( ) . get_lints ( ) ) ;
560564 store. register_late_mod_pass ( |_| Box :: new ( PassByValue ) ) ;
561- store. register_lints ( & SpanUseEqCtxt :: get_lints ( ) ) ;
565+ store. register_lints ( & SpanUseEqCtxt :: default ( ) . get_lints ( ) ) ;
562566 store. register_late_mod_pass ( |_| Box :: new ( SpanUseEqCtxt ) ) ;
563567 // FIXME(davidtwco): deliberately do not include `UNTRANSLATABLE_DIAGNOSTIC` and
564568 // `DIAGNOSTIC_OUTSIDE_OF_IMPL` here because `-Wrustc::internal` is provided to every crate and
0 commit comments