lint: port missing documentation diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
7dffd14b96
commit
82bd2c23e5
2 changed files with 6 additions and 1 deletions
|
@ -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-fn = declaration of an `unsafe` function
|
||||||
lint-builtin-decl-unsafe-method = declaration of an `unsafe` method
|
lint-builtin-decl-unsafe-method = declaration of an `unsafe` method
|
||||||
lint-builtin-impl-unsafe-method = implementation 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 @@ impl MissingDoc {
|
||||||
MISSING_DOCS,
|
MISSING_DOCS,
|
||||||
cx.tcx.sess.source_map().guess_head_span(sp),
|
cx.tcx.sess.source_map().guess_head_span(sp),
|
||||||
|lint| {
|
|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();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue