diff options
| author | Diego de Oliveira <diego@diegooliveira.com> | 2022-09-14 15:03:12 -0300 |
|---|---|---|
| committer | Nathan Stocks <cleancut@github.com> | 2022-10-07 13:19:27 -0600 |
| commit | 1222541cfd69386d0383c37042d8bbfd9f2ad0a3 (patch) | |
| tree | e54a4c7c1e03fa311734a15130b20f64cf2386d1 | |
| parent | b8e03cfa55d6133f8fc1fd3a82a7e686a9cf006e (diff) | |
| download | rust-1222541cfd69386d0383c37042d8bbfd9f2ad0a3.tar.gz rust-1222541cfd69386d0383c37042d8bbfd9f2ad0a3.zip | |
resolve merge conflict from cherry-picking 6a47326a0452cc8d5cb57676508b5469d648c67f
| -rw-r--r-- | compiler/rustc_error_messages/locales/en-US/passes.ftl | 3 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_error_messages/locales/en-US/passes.ftl b/compiler/rustc_error_messages/locales/en-US/passes.ftl index bd6a973e916..0c98f567276 100644 --- a/compiler/rustc_error_messages/locales/en-US/passes.ftl +++ b/compiler/rustc_error_messages/locales/en-US/passes.ftl @@ -384,3 +384,6 @@ passes_local_duplicate_lang_item = passes_invalid_attr_at_crate_level = `{$name}` attribute cannot be used at crate level .suggestion = perhaps you meant to use an outer attribute + +passes_deprecated_annotation_has_no_effect = this `#[deprecated]` annotation has no effect + .suggestion = remove the unnecessary deprecation attribute diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index 9b8eebd6be0..10deb4db55f 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -744,3 +744,10 @@ impl IntoDiagnostic<'_> for InvalidAttrAtCrateLevel { diag } } + +#[derive(LintDiagnostic)] +#[diag(passes::deprecated_annotation_has_no_effect)] +pub struct DeprecatedAnnotationHasNoEffect { + #[suggestion(applicability = "machine-applicable", code = "")] + pub span: Span, +} |
