diff options
| author | Jana Dönszelmann <jana@donsz.nl> | 2025-06-12 13:52:23 +0200 | 
|---|---|---|
| committer | Jana Dönszelmann <jana@donsz.nl> | 2025-06-20 15:06:29 +0200 | 
| commit | de0fd27f347c783b45fc9764baa944455369cd33 (patch) | |
| tree | 120641693fe8b5dc067306b04808b44f27ceb138 /compiler/rustc_attr_parsing/src/session_diagnostics.rs | |
| parent | 3b97f1308ff72016a4aaa93fbe6d09d4d6427815 (diff) | |
| download | rust-de0fd27f347c783b45fc9764baa944455369cd33.tar.gz rust-de0fd27f347c783b45fc9764baa944455369cd33.zip | |
cold
Diffstat (limited to 'compiler/rustc_attr_parsing/src/session_diagnostics.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/session_diagnostics.rs | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/compiler/rustc_attr_parsing/src/session_diagnostics.rs b/compiler/rustc_attr_parsing/src/session_diagnostics.rs index 337921a318c..29f2e44a98a 100644 --- a/compiler/rustc_attr_parsing/src/session_diagnostics.rs +++ b/compiler/rustc_attr_parsing/src/session_diagnostics.rs @@ -474,6 +474,7 @@ pub(crate) struct UnrecognizedReprHint { } pub(crate) enum AttributeParseErrorReason { + ExpectedNoArgs, ExpectedStringLiteral { byte_string: Option<Span> }, ExpectedSingleArgument, ExpectedList, @@ -529,6 +530,10 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AttributeParseError { diag.span_label(self.span, format!("didn't expect a literal here")); diag.code(E0565); } + AttributeParseErrorReason::ExpectedNoArgs => { + diag.span_label(self.span, format!("didn't expect any arguments here")); + diag.code(E0565); + } AttributeParseErrorReason::ExpectedNameValue(None) => { diag.span_label( self.span, | 
