diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-03-22 13:04:23 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-03-22 13:04:23 +0100 |
| commit | be97eb4ece63b9e8e094939eb724885fcc2a6919 (patch) | |
| tree | 09e7ebd9b4fba5227d385905042bac5d854a37bd /src | |
| parent | 966400253b3c5df2ed96e443d64147244dc6f338 (diff) | |
| download | rust-be97eb4ece63b9e8e094939eb724885fcc2a6919.tar.gz rust-be97eb4ece63b9e8e094939eb724885fcc2a6919.zip | |
Update lint name to follow convention
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_session/lint/builtin.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/core.rs | 6 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/no-crate-level-doc-lint.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/no-crate-level-doc-lint.stderr | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/librustc_session/lint/builtin.rs b/src/librustc_session/lint/builtin.rs index 1c010139ef6..9ad6e792c28 100644 --- a/src/librustc_session/lint/builtin.rs +++ b/src/librustc_session/lint/builtin.rs @@ -387,7 +387,7 @@ declare_lint! { } declare_lint! { - pub MISSING_CRATE_LEVEL_DOC, + pub MISSING_CRATE_LEVEL_DOCS, 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, - MISSING_CRATE_LEVEL_DOC, + MISSING_CRATE_LEVEL_DOCS, MISSING_DOC_CODE_EXAMPLES, PRIVATE_DOC_TESTS, WHERE_CLAUSES_OBJECT_SAFETY, diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 4d2d81e48fc..fe3a9b6b3dc 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::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( diff --git a/src/test/rustdoc-ui/no-crate-level-doc-lint.rs b/src/test/rustdoc-ui/no-crate-level-doc-lint.rs index c65af73ead1..152a7cd88bc 100644 --- a/src/test/rustdoc-ui/no-crate-level-doc-lint.rs +++ b/src/test/rustdoc-ui/no-crate-level-doc-lint.rs @@ -1,3 +1,3 @@ -#![deny(missing_crate_level_doc)] +#![deny(missing_crate_level_docs)] pub fn foo() {} diff --git a/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr b/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr index f8d3723e7b0..6e7e2fb3eb7 100644 --- a/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr +++ b/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr @@ -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 |
