about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-11-02 13:17:14 +0100
committerMara Bos <m-ou.se@m-ou.se>2020-11-02 13:21:18 +0100
commit9c647d102168f0344bf895aedf96dd52c193aa25 (patch)
treea9086c4eea91a8105a187c9d03d5282f644d1b7f /compiler/rustc_passes/src
parent9fc991a0ea1df0a5ef96c50fb8dce115c096d8f5 (diff)
downloadrust-9c647d102168f0344bf895aedf96dd52c193aa25.tar.gz
rust-9c647d102168f0344bf895aedf96dd52c193aa25.zip
Improve deprecation attribute diagnostic messages.
(From the PR feedback.)

Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/stability.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs
index f6923b0dd9c..04b5c65e464 100644
--- a/compiler/rustc_passes/src/stability.rs
+++ b/compiler/rustc_passes/src/stability.rs
@@ -92,10 +92,10 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> {
 
             if kind == AnnotationKind::Prohibited || kind == AnnotationKind::DeprecationProhibited {
                 self.tcx.struct_span_lint_hir(USELESS_DEPRECATED, hir_id, *span, |lint| {
-                    lint.build("this `#[deprecated]' annotation has no effect")
-                        .span_suggestion(
+                    lint.build("this `#[deprecated]` annotation has no effect")
+                        .span_suggestion_short(
                             *span,
-                            "try removing the deprecation attribute",
+                            "remove the unnecessary deprecation attribute",
                             String::new(),
                             rustc_errors::Applicability::MachineApplicable,
                         )