From 1a6c3d449acd392a48e2837baffdc6b778c85c19 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Tue, 25 Aug 2020 09:18:57 -0400 Subject: [PATCH] Minor refactors --- src/librustdoc/core.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 7a0cf3717c93..b164438c0ade 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,