Update lint name to follow convention

This commit is contained in:
Guillaume Gomez 2020-03-22 13:04:23 +01:00
parent 966400253b
commit be97eb4ece
4 changed files with 8 additions and 8 deletions

View File

@ -387,7 +387,7 @@
}
declare_lint! {
pub MISSING_CRATE_LEVEL_DOC,
pub MISSING_CRATE_LEVEL_DOCS,
Allow,
"detects crates with no crate-level documentation"
}
@ -553,7 +553,7 @@
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,

View 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(

View File

@ -1,3 +1,3 @@
#![deny(missing_crate_level_doc)]
#![deny(missing_crate_level_docs)]
pub fn foo() {}

View 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