Skip to content

Commit 863387c

Browse files
committed
Remove unused BuiltinLintDiag variant InnerAttributeUnstable
This variant doesn't appear to have ever been used. There's a matching message in `rustc_resolve`, that used to have a FIXME for porting it to the new diagnostic infrastructure, but that message is using `feature_err`, which doesn't use buffered lints. Thus, even when that does get ported, it won't use `BuiltinLintDiag`.
1 parent 690a578 commit 863387c

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

compiler/rustc_lint/messages.ftl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as i
205205
.current_use = this identifier can be confused with `{$existing_sym}`
206206
.other_use = other identifier used here
207207
208-
lint_custom_inner_attribute_unstable = custom inner attributes are unstable
209-
210208
lint_dangling_pointers_from_locals = a dangling pointer will be produced because the local variable `{$local_var_name}` will be dropped
211209
.ret_ty = return type of the {$fn_kind} is `{$ret_ty}`
212210
.local_var = `{$local_var_name}` is part the {$fn_kind} and will be dropped at the end of the {$fn_kind}
@@ -427,8 +425,6 @@ lint_improper_ctypes_union_non_exhaustive = this union is non-exhaustive
427425
lint_incomplete_include =
428426
include macro expected single expression in source
429427
430-
lint_inner_macro_attribute_unstable = inner macro attributes are unstable
431-
432428
lint_invalid_asm_label_binary = avoid using labels containing only the digits `0` and `1` in inline assembly
433429
.label = use a different label that doesn't start with `0` or `1`
434430
.help = start numbering with `2` instead

compiler/rustc_lint/src/early/diagnostics.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,6 @@ pub fn decorate_builtin_lint(
463463
}
464464
.decorate_lint(diag)
465465
}
466-
BuiltinLintDiag::InnerAttributeUnstable { is_macro } => if is_macro {
467-
lints::InnerAttributeUnstable::InnerMacroAttribute
468-
} else {
469-
lints::InnerAttributeUnstable::CustomInnerAttribute
470-
}
471-
.decorate_lint(diag),
472466
BuiltinLintDiag::OutOfScopeMacroCalls { span, path, location } => {
473467
lints::OutOfScopeMacroCalls { span, path, location }.decorate_lint(diag)
474468
}

compiler/rustc_lint/src/lints.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,14 +2678,6 @@ pub(crate) struct IllFormedAttributeInput {
26782678
pub docs: &'static str,
26792679
}
26802680

2681-
#[derive(LintDiagnostic)]
2682-
pub(crate) enum InnerAttributeUnstable {
2683-
#[diag(lint_inner_macro_attribute_unstable)]
2684-
InnerMacroAttribute,
2685-
#[diag(lint_custom_inner_attribute_unstable)]
2686-
CustomInnerAttribute,
2687-
}
2688-
26892681
#[derive(LintDiagnostic)]
26902682
#[diag(lint_unknown_diagnostic_attribute)]
26912683
pub(crate) struct UnknownDiagnosticAttribute {

compiler/rustc_lint_defs/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,6 @@ pub enum BuiltinLintDiag {
800800
suggestions: Vec<String>,
801801
docs: Option<&'static str>,
802802
},
803-
InnerAttributeUnstable {
804-
is_macro: bool,
805-
},
806803
OutOfScopeMacroCalls {
807804
span: Span,
808805
path: String,

0 commit comments

Comments
 (0)