Skip to content

Commit

Permalink
Update lint name to follow convention
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 22, 2020
1 parent 9664002 commit be97eb4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/librustc_session/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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());
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-ui/no-crate-level-doc-lint.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#![deny(missing_crate_level_doc)]
#![deny(missing_crate_level_docs)]

pub fn foo() {}
4 changes: 2 additions & 2 deletions src/test/rustdoc-ui/no-crate-level-doc-lint.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit be97eb4

Please sign in to comment.