From f767f541e7a7eed4cd827511146372021acacc22 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 11 Feb 2020 11:45:40 +0100 Subject: [PATCH] rename NO_CRATE_LEVEL_DOC lint into MISSING_CRATE_LEVEL_DOC --- src/librustc_session/lint/builtin.rs | 4 ++-- src/librustdoc/core.rs | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/librustc_session/lint/builtin.rs b/src/librustc_session/lint/builtin.rs index deb119ccb97..1c010139ef6 100644 --- a/src/librustc_session/lint/builtin.rs +++ b/src/librustc_session/lint/builtin.rs @@ -387,7 +387,7 @@ } declare_lint! { - pub NO_CRATE_LEVEL_DOC, + pub MISSING_CRATE_LEVEL_DOC, Allow, "detects crates with no crate-level documentation" } @@ -553,7 +553,7 @@ UNSTABLE_NAME_COLLISIONS, IRREFUTABLE_LET_PATTERNS, INTRA_DOC_LINK_RESOLUTION_FAILURE, - NO_CRATE_LEVEL_DOC, + MISSING_CRATE_LEVEL_DOC, MISSING_DOC_CODE_EXAMPLES, PRIVATE_DOC_TESTS, WHERE_CLAUSES_OBJECT_SAFETY, diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index a45761ba4a8..47b6699368c 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -249,7 +249,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt let missing_docs = rustc_lint::builtin::MISSING_DOCS.name; let missing_doc_example = rustc_lint::builtin::MISSING_DOC_CODE_EXAMPLES.name; let private_doc_tests = rustc_lint::builtin::PRIVATE_DOC_TESTS.name; - let no_crate_level_doc = rustc_lint::builtin::NO_CRATE_LEVEL_DOC.name; + let no_crate_level_doc = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC.name; // In addition to those specific lints, we also need to whitelist those given through // command line, otherwise they'll get ignored and we don't want that. @@ -417,7 +417,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt match m.doc_value() { None | Some("") => { let mut diag = tcx.struct_lint_node( - rustc_lint::builtin::NO_CRATE_LEVEL_DOC, + rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC, ctxt.as_local_hir_id(m.def_id).unwrap(), "No documentation found on this crate top module.\n\n\ Maybe you could be interested into looking at this documentation:\n\ @@ -432,8 +432,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt fn report_deprecated_attr(name: &str, diag: &rustc_errors::Handler) { let mut msg = diag.struct_warn(&format!( - "the `#![doc({})]` attribute is \ - considered deprecated", + "the `#![doc({})]` attribute is considered deprecated", name )); msg.warn(