about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-08-25 09:18:57 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-08-25 09:18:57 -0400
commit1a6c3d449acd392a48e2837baffdc6b778c85c19 (patch)
treec9f29263d176f0f2e0d356b3085277b47eb2750c /src
parentc35007dbbe4846c641b5edad9fddf3f72a5a035a (diff)
downloadrust-1a6c3d449acd392a48e2837baffdc6b778c85c19.tar.gz
rust-1a6c3d449acd392a48e2837baffdc6b778c85c19.zip
Minor refactors
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/core.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 7a0cf3717c9..b164438c0ad 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -331,7 +331,7 @@ pub fn run_core(
 
     // In addition to those specific lints, we also need to allow those given through
     // command line, otherwise they'll get ignored and we don't want that.
-    let allowed_lints = vec![
+    let lints_to_show = vec![
         intra_link_resolution_failure_name.to_owned(),
         missing_docs.to_owned(),
         missing_doc_example.to_owned(),
@@ -340,7 +340,7 @@ pub fn run_core(
         invalid_codeblock_attributes_name.to_owned(),
     ];
 
-    let (lint_opts, lint_caps) = init_lints(allowed_lints, lint_opts, |lint| {
+    let (lint_opts, lint_caps) = init_lints(lints_to_show, lint_opts, |lint| {
         if lint.name == intra_link_resolution_failure_name
             || lint.name == invalid_codeblock_attributes_name
         {
@@ -358,7 +358,7 @@ pub fn run_core(
         search_paths: libs,
         crate_types,
         lint_opts: if !display_warnings { lint_opts } else { vec![] },
-        lint_cap: Some(lint_cap.unwrap_or_else(|| lint::Forbid)),
+        lint_cap,
         cg: codegen_options,
         externs,
         target_triple: target,