]> git.lizzy.rs Git - rust.git/commitdiff
Update lint name to follow convention
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 22 Mar 2020 12:04:23 +0000 (13:04 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 22 Mar 2020 12:04:23 +0000 (13:04 +0100)
src/librustc_session/lint/builtin.rs
src/librustdoc/core.rs
src/test/rustdoc-ui/no-crate-level-doc-lint.rs
src/test/rustdoc-ui/no-crate-level-doc-lint.stderr

index 1c010139ef6db2281b3ae28bdd6eff06ab3db39b..9ad6e792c28ba13b03ba4b024f4f96dcad010d02 100644 (file)
 }
 
 declare_lint! {
-    pub MISSING_CRATE_LEVEL_DOC,
+    pub MISSING_CRATE_LEVEL_DOCS,
     Allow,
     "detects crates with no crate-level documentation"
 }
         UNSTABLE_NAME_COLLISIONS,
         IRREFUTABLE_LET_PATTERNS,
         INTRA_DOC_LINK_RESOLUTION_FAILURE,
-        MISSING_CRATE_LEVEL_DOC,
+        MISSING_CRATE_LEVEL_DOCS,
         MISSING_DOC_CODE_EXAMPLES,
         PRIVATE_DOC_TESTS,
         WHERE_CLAUSES_OBJECT_SAFETY,
index 4d2d81e48fc9e48f62c17e29c801d4ccdfaa5243..fe3a9b6b3dcdd7b18d414a97594cc1bfe19f10b7 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::MISSING_CRATE_LEVEL_DOC.name;
+    let no_crate_level_docs = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS.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.
@@ -259,7 +259,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
         missing_docs.to_owned(),
         missing_doc_example.to_owned(),
         private_doc_tests.to_owned(),
-        no_crate_level_doc.to_owned(),
+        no_crate_level_docs.to_owned(),
     ];
 
     whitelisted_lints.extend(lint_opts.iter().map(|(lint, _)| lint).cloned());
@@ -419,7 +419,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
                              https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation\
                              .html";
                         tcx.struct_lint_node(
-                            rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC,
+                            rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS,
                             ctxt.as_local_hir_id(m.def_id).unwrap(),
                             |lint| {
                                 let mut diag = lint.build(
index c65af73ead1e50c19426feab7151c54200f07170..152a7cd88bcb1558633160aa4f7c05f2cca4d245 100644 (file)
@@ -1,3 +1,3 @@
-#![deny(missing_crate_level_doc)]
+#![deny(missing_crate_level_docs)]
 
 pub fn foo() {}
index f8d3723e7b0b4bc0e99d13a8a7c49ebfa10bb84d..6e7e2fb3eb73ff08b4f80fdcd0e9aa2f2deb7720 100644 (file)
@@ -3,8 +3,8 @@ error: no documentation found for this crate's top-level module
 note: the lint level is defined here
   --> $DIR/no-crate-level-doc-lint.rs:1:9
    |
-LL | #![deny(missing_crate_level_doc)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![deny(missing_crate_level_docs)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^
    = help: The following guide may be of use:
            https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation.html