diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-11-02 13:17:14 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-11-02 13:21:18 +0100 |
| commit | 9c647d102168f0344bf895aedf96dd52c193aa25 (patch) | |
| tree | a9086c4eea91a8105a187c9d03d5282f644d1b7f /compiler/rustc_passes/src | |
| parent | 9fc991a0ea1df0a5ef96c50fb8dce115c096d8f5 (diff) | |
| download | rust-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.rs | 6 |
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, ) |
