Skip to content

Commit be97eb4

Browse files
Update lint name to follow convention
1 parent 9664002 commit be97eb4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/librustc_session/lint/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ declare_lint! {
387387
}
388388

389389
declare_lint! {
390-
pub MISSING_CRATE_LEVEL_DOC,
390+
pub MISSING_CRATE_LEVEL_DOCS,
391391
Allow,
392392
"detects crates with no crate-level documentation"
393393
}
@@ -553,7 +553,7 @@ declare_lint_pass! {
553553
UNSTABLE_NAME_COLLISIONS,
554554
IRREFUTABLE_LET_PATTERNS,
555555
INTRA_DOC_LINK_RESOLUTION_FAILURE,
556-
MISSING_CRATE_LEVEL_DOC,
556+
MISSING_CRATE_LEVEL_DOCS,
557557
MISSING_DOC_CODE_EXAMPLES,
558558
PRIVATE_DOC_TESTS,
559559
WHERE_CLAUSES_OBJECT_SAFETY,

src/librustdoc/core.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
249249
let missing_docs = rustc_lint::builtin::MISSING_DOCS.name;
250250
let missing_doc_example = rustc_lint::builtin::MISSING_DOC_CODE_EXAMPLES.name;
251251
let private_doc_tests = rustc_lint::builtin::PRIVATE_DOC_TESTS.name;
252-
let no_crate_level_doc = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC.name;
252+
let no_crate_level_docs = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS.name;
253253

254254
// In addition to those specific lints, we also need to whitelist those given through
255255
// 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
259259
missing_docs.to_owned(),
260260
missing_doc_example.to_owned(),
261261
private_doc_tests.to_owned(),
262-
no_crate_level_doc.to_owned(),
262+
no_crate_level_docs.to_owned(),
263263
];
264264

265265
whitelisted_lints.extend(lint_opts.iter().map(|(lint, _)| lint).cloned());
@@ -419,7 +419,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
419419
https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation\
420420
.html";
421421
tcx.struct_lint_node(
422-
rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC,
422+
rustc_lint::builtin::MISSING_CRATE_LEVEL_DOCS,
423423
ctxt.as_local_hir_id(m.def_id).unwrap(),
424424
|lint| {
425425
let mut diag = lint.build(
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#![deny(missing_crate_level_doc)]
1+
#![deny(missing_crate_level_docs)]
22

33
pub fn foo() {}

src/test/rustdoc-ui/no-crate-level-doc-lint.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ error: no documentation found for this crate's top-level module
33
note: the lint level is defined here
44
--> $DIR/no-crate-level-doc-lint.rs:1:9
55
|
6-
LL | #![deny(missing_crate_level_doc)]
7-
| ^^^^^^^^^^^^^^^^^^^^^^^
6+
LL | #![deny(missing_crate_level_docs)]
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^
88
= help: The following guide may be of use:
99
https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation.html
1010

0 commit comments

Comments
 (0)