rustdoc: adopt to the new lint API

This commit is contained in:
Maybe Waffle
2022-09-16 19:07:20 +04:00
parent 7e90a41844
commit 6ecacf76bc
7 changed files with 61 additions and 78 deletions

View File

@@ -404,12 +404,8 @@ pub(crate) fn run_global_ctxt(
tcx.struct_lint_node(
crate::lint::MISSING_CRATE_LEVEL_DOCS,
DocContext::as_local_hir_id(tcx, krate.module.item_id).unwrap(),
|lint| {
let mut diag =
lint.build("no documentation found for this crate's top-level module");
diag.help(&help);
diag.emit();
},
"no documentation found for this crate's top-level module",
|lint| lint.help(help),
);
}