Emit a warning on generic parameters with doc comments
This commit is contained in:
parent
207c80f105
commit
bd894a0877
3 changed files with 16 additions and 1 deletions
|
@ -1079,6 +1079,10 @@ impl EarlyLintPass for UnusedDocComment {
|
|||
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &ast::Expr) {
|
||||
warn_if_doc(cx, expr.span, "expressions", &expr.attrs);
|
||||
}
|
||||
|
||||
fn check_generic_param(&mut self, cx: &EarlyContext<'_>, param: &ast::GenericParam) {
|
||||
warn_if_doc(cx, param.ident.span, "generic parameters", ¶m.attrs);
|
||||
}
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue