1
Fork 0

Also use INVALID_DOC_ATTRIBUTE for "unknown doc attribute" warnings

This commit is contained in:
Guillaume Gomez 2021-03-04 21:48:07 +01:00
parent 85c3d102bb
commit 55cec9079d
5 changed files with 21 additions and 22 deletions

View file

@ -585,7 +585,7 @@ impl CheckAttrVisitor<'tcx> {
.any(|m| i_meta.has_name(*m))
{
self.tcx.struct_span_lint_hir(
UNUSED_ATTRIBUTES,
INVALID_DOC_ATTRIBUTE,
hir_id,
i_meta.span,
|lint| {
@ -593,11 +593,6 @@ impl CheckAttrVisitor<'tcx> {
"unknown `doc` attribute `{}`",
i_meta.name_or_empty()
))
.warn(
"this was previously accepted by the compiler but is \
being phased out; it will become a hard error in \
a future release!",
)
.emit();
},
);