about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-02-11 11:45:40 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-03-22 13:01:42 +0100
commitf767f541e7a7eed4cd827511146372021acacc22 (patch)
treeb34eb47c6492308e5b47fe7e179a080ee3d60ce2
parent12607ef569dfa086d5475d0d7b1858965931519b (diff)
downloadrust-f767f541e7a7eed4cd827511146372021acacc22.tar.gz
rust-f767f541e7a7eed4cd827511146372021acacc22.zip
rename NO_CRATE_LEVEL_DOC lint into MISSING_CRATE_LEVEL_DOC
-rw-r--r--src/librustc_session/lint/builtin.rs4
-rw-r--r--src/librustdoc/core.rs7
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! {
 }
 
 declare_lint! {
-    pub NO_CRATE_LEVEL_DOC,
+    pub MISSING_CRATE_LEVEL_DOC,
     Allow,
     "detects crates with no crate-level documentation"
 }
@@ -553,7 +553,7 @@ declare_lint_pass! {
         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(