about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-03-04 21:48:07 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2021-03-04 21:48:07 +0100
commit55cec9079deb3aec02bc8158de94284a42a0ee79 (patch)
tree1bf54ec0d64dc9309cca85a22e36db933566013c /compiler
parent85c3d102bb1e03838e0fcccb820b47d1896b2455 (diff)
downloadrust-55cec9079deb3aec02bc8158de94284a42a0ee79.tar.gz
rust-55cec9079deb3aec02bc8158de94284a42a0ee79.zip
Also use INVALID_DOC_ATTRIBUTE for "unknown doc attribute" warnings
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index c84d29428ad..a868802b4a6 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -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();
                                 },
                             );