@@ -132,7 +132,7 @@ use unused::must_use::*;
132132use unused:: * ;
133133
134134#[ rustfmt:: skip]
135- pub use builtin:: { MissingDoc , SoftLints } ;
135+ pub use builtin:: MissingDoc ;
136136pub use context:: { CheckLintNameResult , EarlyContext , LateContext , LintContext , LintStore } ;
137137pub use early:: diagnostics:: DiagAndSess ;
138138pub use early:: { EarlyCheckNode , check_ast_node} ;
@@ -281,11 +281,11 @@ fn register_builtins(store: &mut LintStore) {
281281 )
282282 }
283283
284- store. register_lints ( & BuiltinCombinedPreExpansionLintPass :: get_lints ( ) ) ;
285- store. register_lints ( & BuiltinCombinedEarlyLintPass :: get_lints ( ) ) ;
286- store. register_lints ( & BuiltinCombinedModuleLateLintPass :: get_lints ( ) ) ;
287- store. register_lints ( & foreign_modules:: get_lints ( ) ) ;
288- store. register_lints ( & HardwiredLints :: lint_vec ( ) ) ;
284+ store. register_lints ( & BuiltinCombinedPreExpansionLintPass :: lint_vec ( ) ) ;
285+ store. register_lints ( & BuiltinCombinedEarlyLintPass :: lint_vec ( ) ) ;
286+ store. register_lints ( & BuiltinCombinedModuleLateLintPass :: lint_vec ( ) ) ;
287+ store. register_lints ( & foreign_modules:: lint_vec ( ) ) ;
288+ store. register_lints ( & hardwired :: lint_vec ( ) ) ;
289289
290290 add_lint_group ! (
291291 "nonstandard_style" ,
@@ -665,6 +665,10 @@ fn register_builtins(store: &mut LintStore) {
665665fn register_internals ( store : & mut LintStore ) {
666666 store. register_lints ( & LintPassImpl :: lint_vec ( ) ) ;
667667 store. register_early_pass ( || Box :: new ( LintPassImpl ) ) ;
668+ store. register_lints ( & ImplicitSysrootCrateImport :: lint_vec ( ) ) ;
669+ store. register_early_pass ( || Box :: new ( ImplicitSysrootCrateImport ) ) ;
670+ store. register_lints ( & BadUseOfFindAttr :: lint_vec ( ) ) ;
671+ store. register_early_pass ( || Box :: new ( BadUseOfFindAttr ) ) ;
668672 store. register_lints ( & DefaultHashTypes :: lint_vec ( ) ) ;
669673 store. register_late_mod_pass ( |_| Box :: new ( DefaultHashTypes ) ) ;
670674 store. register_lints ( & QueryStability :: lint_vec ( ) ) ;
@@ -681,32 +685,46 @@ fn register_internals(store: &mut LintStore) {
681685 store. register_late_mod_pass ( |_| Box :: new ( SpanUseEqCtxt ) ) ;
682686 store. register_lints ( & SymbolInternStringLiteral :: lint_vec ( ) ) ;
683687 store. register_late_mod_pass ( |_| Box :: new ( SymbolInternStringLiteral ) ) ;
684- store. register_lints ( & ImplicitSysrootCrateImport :: lint_vec ( ) ) ;
685- store. register_early_pass ( || Box :: new ( ImplicitSysrootCrateImport ) ) ;
686- store. register_lints ( & BadUseOfFindAttr :: lint_vec ( ) ) ;
687- store. register_early_pass ( || Box :: new ( BadUseOfFindAttr ) ) ;
688688 store. register_lints ( & RustcMustMatchExhaustively :: lint_vec ( ) ) ;
689689 store. register_late_pass ( |_| Box :: new ( RustcMustMatchExhaustively ) ) ;
690690 store. register_group (
691691 false ,
692692 "rustc::internal" ,
693693 None ,
694694 vec ! [
695+ // Early pass: LintPassImpl
696+ LintId :: of( LINT_PASS_IMPL_WITHOUT_MACRO ) ,
697+ // Early pass: ImplicitSysrootCrateImport
698+ LintId :: of( IMPLICIT_SYSROOT_CRATE_IMPORT ) ,
699+ // Early pass: BadUseOfFindAttr
700+ LintId :: of( BAD_USE_OF_FIND_ATTR ) ,
701+ // Late pass: DefaultHashTypes
695702 LintId :: of( DEFAULT_HASH_TYPES ) ,
703+ // Late pass: QueryStability
696704 LintId :: of( POTENTIAL_QUERY_INSTABILITY ) ,
697705 LintId :: of( UNTRACKED_QUERY_INFORMATION ) ,
706+ // Late pass: TyTyKind
698707 LintId :: of( USAGE_OF_TY_TYKIND ) ,
699- LintId :: of( DISALLOWED_PASS_BY_REF ) ,
700- LintId :: of( LINT_PASS_IMPL_WITHOUT_MACRO ) ,
701708 LintId :: of( USAGE_OF_QUALIFIED_TY ) ,
709+ // Late pass: TypeIr
710+ LintId :: of( DIRECT_USE_OF_RUSTC_TYPE_IR ) ,
702711 LintId :: of( NON_GLOB_IMPORT_OF_TYPE_IR_INHERENT ) ,
703712 LintId :: of( USAGE_OF_TYPE_IR_INHERENT ) ,
704713 LintId :: of( USAGE_OF_TYPE_IR_TRAITS ) ,
714+ // Late pass: BadOptAccess
705715 LintId :: of( BAD_OPT_ACCESS ) ,
716+ // Late pass: DisallowedPassByRef
717+ LintId :: of( DISALLOWED_PASS_BY_REF ) ,
718+ // Late pass: SpanUseEqCtxt
706719 LintId :: of( SPAN_USE_EQ_CTXT ) ,
707- LintId :: of( DIRECT_USE_OF_RUSTC_TYPE_IR ) ,
708- LintId :: of( IMPLICIT_SYSROOT_CRATE_IMPORT ) ,
709- LintId :: of( BAD_USE_OF_FIND_ATTR ) ,
720+ // Late pass: SymbolInternStringLiteral
721+ // Note: this one is not included in rustc::internal because rustc_driver crates
722+ // outside the compiler can't/shouldn't add preinterned symbols. For rustc itself,
723+ // bootstrap enables this lint manually. For rustdoc,
724+ // `warn(symbol_intern_string_literal)` is used.
725+ // LintId::of(SYMBOL_INTERN_STRING_LITERAL),
726+ //
727+ // Late pass: RustcMustMatchExhaustively
710728 LintId :: of( RUSTC_MUST_MATCH_EXHAUSTIVELY ) ,
711729 ] ,
712730 ) ;
0 commit comments