rename NO_CRATE_LEVEL_DOC lint into MISSING_CRATE_LEVEL_DOC

This commit is contained in:
Guillaume Gomez 2020-02-11 11:45:40 +01:00
parent 12607ef569
commit f767f541e7
2 changed files with 5 additions and 6 deletions

View File

@ -387,7 +387,7 @@
}
declare_lint! {
pub NO_CRATE_LEVEL_DOC,
pub MISSING_CRATE_LEVEL_DOC,
Allow,
"detects crates with no crate-level documentation"
}
@ -553,7 +553,7 @@
UNSTABLE_NAME_COLLISIONS,
IRREFUTABLE_LET_PATTERNS,
INTRA_DOC_LINK_RESOLUTION_FAILURE,
NO_CRATE_LEVEL_DOC,
MISSING_CRATE_LEVEL_DOC,
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::NO_CRATE_LEVEL_DOC.name;
let no_crate_level_doc = rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC.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.
@ -417,7 +417,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
match m.doc_value() {
None | Some("") => {
let mut diag = tcx.struct_lint_node(
rustc_lint::builtin::NO_CRATE_LEVEL_DOC,
rustc_lint::builtin::MISSING_CRATE_LEVEL_DOC,
ctxt.as_local_hir_id(m.def_id).unwrap(),
"No documentation found on this crate top module.\n\n\
Maybe you could be interested into looking at this documentation:\n\
@ -432,8 +432,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
fn report_deprecated_attr(name: &str, diag: &rustc_errors::Handler) {
let mut msg = diag.struct_warn(&format!(
"the `#![doc({})]` attribute is \
considered deprecated",
"the `#![doc({})]` attribute is considered deprecated",
name
));
msg.warn(