diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-09-21 10:20:56 -0400 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-09-21 10:42:47 -0400 |
| commit | 6abcadc235c24b0541e7bb3b6f6444d397d32f35 (patch) | |
| tree | bb985e05d25fa7571fe9ca3319f3bf8b818b752d /compiler/rustc_attr_parsing/src/lints.rs | |
| parent | 1d23da6b7304d9e2a2c3dcb1b0aaa709cb9bc4ad (diff) | |
| download | rust-6abcadc235c24b0541e7bb3b6f6444d397d32f35.tar.gz rust-6abcadc235c24b0541e7bb3b6f6444d397d32f35.zip | |
Port #[macro_export] to the new attribute parsing infrastructure
Co-authored-by: Anne Stijns <anstijns@gmail.com>
Diffstat (limited to 'compiler/rustc_attr_parsing/src/lints.rs')
| -rw-r--r-- | compiler/rustc_attr_parsing/src/lints.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_attr_parsing/src/lints.rs b/compiler/rustc_attr_parsing/src/lints.rs index b1a971eec32..ab8ba0daf1f 100644 --- a/compiler/rustc_attr_parsing/src/lints.rs +++ b/compiler/rustc_attr_parsing/src/lints.rs @@ -31,6 +31,18 @@ pub fn emit_attribute_lint<L: LintEmitter>(lint: &AttributeLint<L::Id>, lint_emi }, ); } + AttributeLintKind::InvalidMacroExportArguments { suggestions } => lint_emitter + .emit_node_span_lint( + rustc_session::lint::builtin::INVALID_MACRO_EXPORT_ARGUMENTS, + *id, + *span, + session_diagnostics::IllFormedAttributeInput { + num_suggestions: suggestions.len(), + suggestions: DiagArgValue::StrListSepByAnd( + suggestions.into_iter().map(|s| format!("`{s}`").into()).collect(), + ), + }, + ), AttributeLintKind::EmptyAttribute { first_span } => lint_emitter.emit_node_span_lint( rustc_session::lint::builtin::UNUSED_ATTRIBUTES, *id, |
