diff options
| author | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2025-06-18 22:27:35 +0300 |
|---|---|---|
| committer | Pavel Grigorenko <GrigorenkoPV@ya.ru> | 2025-06-23 22:48:20 +0300 |
| commit | aa80a2b62cde51fc9796a66dfed013a581bff706 (patch) | |
| tree | fa2f84142c37f4762399cce580233940c5ff594e /compiler/rustc_attr_parsing/src/session_diagnostics.rs | |
| parent | 42245d34d22ade32b3f276dcf74deb826841594c (diff) | |
| download | rust-aa80a2b62cde51fc9796a66dfed013a581bff706.tar.gz rust-aa80a2b62cde51fc9796a66dfed013a581bff706.zip | |
Port `#[rustc_skip_during_method_dispatch]` to the new attribute system
Diffstat (limited to 'compiler/rustc_attr_parsing/src/session_diagnostics.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/session_diagnostics.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_attr_parsing/src/session_diagnostics.rs b/compiler/rustc_attr_parsing/src/session_diagnostics.rs index 808e452799d..263b323e3eb 100644 --- a/compiler/rustc_attr_parsing/src/session_diagnostics.rs +++ b/compiler/rustc_attr_parsing/src/session_diagnostics.rs @@ -496,6 +496,7 @@ pub(crate) struct NakedFunctionIncompatibleAttribute { pub(crate) enum AttributeParseErrorReason { ExpectedNoArgs, ExpectedStringLiteral { byte_string: Option<Span> }, + ExpectedAtLeastOneArgument, ExpectedSingleArgument, ExpectedList, UnexpectedLiteral, @@ -539,6 +540,9 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AttributeParseError { diag.span_label(self.span, "expected a single argument here"); diag.code(E0805); } + AttributeParseErrorReason::ExpectedAtLeastOneArgument => { + diag.span_label(self.span, "expected at least 1 argument here"); + } AttributeParseErrorReason::ExpectedList => { diag.span_label(self.span, "expected this to be a list"); } |
