mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
lint: port missing documentation diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
@@ -324,3 +324,5 @@ lint-builtin-export-name-method = declaration of a method with `export_name`
|
||||
lint-builtin-decl-unsafe-fn = declaration of an `unsafe` function
|
||||
lint-builtin-decl-unsafe-method = declaration of an `unsafe` method
|
||||
lint-builtin-impl-unsafe-method = implementation of an `unsafe` method
|
||||
|
||||
lint-builtin-missing-doc = missing documentation for {$article} {$desc}
|
||||
|
||||
@@ -582,7 +582,10 @@ fn check_missing_docs_attrs(
|
||||
MISSING_DOCS,
|
||||
cx.tcx.sess.source_map().guess_head_span(sp),
|
||||
|lint| {
|
||||
lint.build(&format!("missing documentation for {} {}", article, desc)).emit();
|
||||
lint.build(fluent::lint::builtin_missing_doc)
|
||||
.set_arg("article", article)
|
||||
.set_arg("desc", desc)
|
||||
.emit();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user