]> git.lizzy.rs Git - rust.git/commitdiff
rename NO_CRATE_LEVEL_DOC lint into MISSING_CRATE_LEVEL_DOC
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Tue, 11 Feb 2020 10:45:40 +0000 (11:45 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 22 Mar 2020 12:01:42 +0000 (13:01 +0100)
src/librustc_session/lint/builtin.rs
src/librustdoc/core.rs

index deb119ccb973044aee560ee65226dae8342c0d83..1c010139ef6db2281b3ae28bdd6eff06ab3db39b 100644 (file)
 }
 
 declare_lint! {
-    pub NO_CRATE_LEVEL_DOC,
+    pub MISSING_CRATE_LEVEL_DOC,
     Allow,
     "detects crates with no crate-level documentation"
 }
         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,
index a45761ba4a8b29a42d776f05c762aafe628bb8b6..47b6699368ccf1d7bd6264b43638e557adbced7f 100644 (file)
@@ -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(