mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Remove AttributeLintKind::AmbiguousDeriveHelpers variant
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use rustc_hir::lints::AttributeLintKind;
|
||||
use rustc_errors::Diagnostic;
|
||||
use rustc_session::lint::builtin::AMBIGUOUS_DERIVE_HELPERS;
|
||||
|
||||
use super::prelude::*;
|
||||
@@ -125,9 +125,9 @@ fn parse_derive_like<S: Stage>(
|
||||
return None;
|
||||
}
|
||||
if rustc_feature::is_builtin_attr_name(ident.name) {
|
||||
cx.emit_lint(
|
||||
cx.emit_dyn_lint(
|
||||
AMBIGUOUS_DERIVE_HELPERS,
|
||||
AttributeLintKind::AmbiguousDeriveHelpers,
|
||||
|dcx, level| crate::errors::AmbiguousDeriveHelpers.into_diag(dcx, level),
|
||||
ident.span,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -177,3 +177,7 @@ pub(crate) struct DocAliasDuplicated {
|
||||
#[derive(Diagnostic)]
|
||||
#[diag("only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]`")]
|
||||
pub(crate) struct DocAutoCfgExpectsHideOrShow;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag("there exists a built-in attribute with the same name")]
|
||||
pub(crate) struct AmbiguousDeriveHelpers;
|
||||
|
||||
@@ -43,10 +43,6 @@ fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> {
|
||||
.into_diag(dcx, level)
|
||||
}
|
||||
|
||||
&AttributeLintKind::AmbiguousDeriveHelpers => {
|
||||
lints::AmbiguousDeriveHelpers.into_diag(dcx, level)
|
||||
}
|
||||
|
||||
&AttributeLintKind::DocAutoCfgHideShowUnexpectedItem { attr_name } => {
|
||||
lints::DocAutoCfgHideShowUnexpectedItem { attr_name }.into_diag(dcx, level)
|
||||
}
|
||||
|
||||
@@ -3303,10 +3303,6 @@ fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
|
||||
)]
|
||||
pub(crate) struct ExpectedNameValue;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag("there exists a built-in attribute with the same name")]
|
||||
pub(crate) struct AmbiguousDeriveHelpers;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag("`#![doc(auto_cfg({$attr_name}(...)))]` only accepts identifiers or key/value items")]
|
||||
pub(crate) struct DocAutoCfgHideShowUnexpectedItem {
|
||||
|
||||
@@ -659,7 +659,6 @@ pub enum AttributeLintKind {
|
||||
DocAutoCfgHideShowUnexpectedItem { attr_name: Symbol },
|
||||
DocAutoCfgHideShowExpectsList { attr_name: Symbol },
|
||||
DocInvalid,
|
||||
AmbiguousDeriveHelpers,
|
||||
DocUnknownInclude { span: Span, inner: &'static str, value: Symbol },
|
||||
DocUnknownSpotlight { span: Span },
|
||||
DocUnknownPasses { name: Symbol, span: Span },
|
||||
|
||||
Reference in New Issue
Block a user