@@ -189,6 +189,7 @@ pub fn run_core(search_paths: SearchPaths,
189
189
190
190
let intra_link_resolution_failure_name = lint:: builtin:: INTRA_DOC_LINK_RESOLUTION_FAILURE . name ;
191
191
let warnings_lint_name = lint:: builtin:: WARNINGS . name ;
192
+ let missing_docs = rustc_lint:: builtin:: MISSING_DOCS . name ;
192
193
let lints = lint:: builtin:: HardwiredLints . get_lints ( )
193
194
. into_iter ( )
194
195
. chain ( rustc_lint:: SoftLints . get_lints ( ) . into_iter ( ) )
@@ -236,12 +237,22 @@ pub fn run_core(search_paths: SearchPaths,
236
237
sessopts, cpath, diagnostic_handler, codemap,
237
238
) ;
238
239
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
+ } ) ;
245
256
246
257
let codegen_backend = rustc_driver:: get_codegen_backend ( & sess) ;
247
258
let cstore = Rc :: new ( CStore :: new ( codegen_backend. metadata_loader ( ) ) ) ;
0 commit comments