Lint non-meta doc attributes
E.g., `#[doc(123)]`.
This commit is contained in:
parent
9613a88db5
commit
7189c05bf8
3 changed files with 37 additions and 1 deletions
|
@ -605,6 +605,16 @@ impl CheckAttrVisitor<'tcx> {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self.tcx.struct_span_lint_hir(
|
||||
INVALID_DOC_ATTRIBUTES,
|
||||
hir_id,
|
||||
meta.span(),
|
||||
|lint| {
|
||||
lint.build(&format!("unknown `doc` attribute")).emit();
|
||||
},
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue