@@ -189,6 +189,7 @@ pub fn run_core(search_paths: SearchPaths,
189189
190190 let intra_link_resolution_failure_name = lint:: builtin:: INTRA_DOC_LINK_RESOLUTION_FAILURE . name ;
191191 let warnings_lint_name = lint:: builtin:: WARNINGS . name ;
192+ let missing_docs = rustc_lint:: builtin:: MISSING_DOCS . name ;
192193 let lints = lint:: builtin:: HardwiredLints . get_lints ( )
193194 . iter ( )
194195 . chain ( rustc_lint:: SoftLints . get_lints ( ) )
@@ -236,12 +237,22 @@ pub fn run_core(search_paths: SearchPaths,
236237 sessopts, cpath, diagnostic_handler, codemap,
237238 ) ;
238239
239- let shutdown_lints = [ lint:: builtin:: UNUSED_IMPORTS ,
240- lint:: builtin:: UNUSED_EXTERN_CRATES ] ;
241-
242- for l in & shutdown_lints {
243- sess. driver_lint_caps . insert ( lint:: LintId :: of ( l) , lint:: Allow ) ;
244- }
240+ lint:: builtin:: HardwiredLints . get_lints ( )
241+ . into_iter ( )
242+ . chain ( rustc_lint:: SoftLints . get_lints ( ) . into_iter ( ) )
243+ . filter_map ( |lint| {
244+ if lint. name == warnings_lint_name ||
245+ lint. name == intra_link_resolution_failure_name ||
246+ lint. name == missing_docs {
247+ None
248+ } else {
249+ Some ( lint)
250+ }
251+ } )
252+ . for_each ( |l| {
253+ sess. driver_lint_caps . insert ( lint:: LintId :: of ( l) ,
254+ lint:: Allow ) ;
255+ } ) ;
245256
246257 let codegen_backend = rustc_driver:: get_codegen_backend ( & sess) ;
247258 let cstore = Rc :: new ( CStore :: new ( codegen_backend. metadata_loader ( ) ) ) ;
0 commit comments