diff options
| author | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-06-24 23:05:45 +0200 |
|---|---|---|
| committer | Jonathan Brouwer <jonathantbrouwer@gmail.com> | 2025-06-26 08:50:42 +0200 |
| commit | 3d1cee53244dce3a9e58e04c87ba8d02d964f79f (patch) | |
| tree | 2370a72d097c42d9173078b0a1722c46b7a46265 /compiler/rustc_passes/src/errors.rs | |
| parent | 287d9afce729dd81fa9abfa860af31656d9c5e16 (diff) | |
| download | rust-3d1cee53244dce3a9e58e04c87ba8d02d964f79f.tar.gz rust-3d1cee53244dce3a9e58e04c87ba8d02d964f79f.zip | |
Move mixed export_name/no_mangle check to check_attr.rs and improve the error
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'compiler/rustc_passes/src/errors.rs')
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index d9ec167aae3..3286ccc94f2 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -50,6 +50,18 @@ pub(crate) struct ConstContinueAttr { } #[derive(LintDiagnostic)] +#[diag(passes_mixed_export_name_and_no_mangle)] +pub(crate) struct MixedExportNameAndNoMangle { + #[label] + #[suggestion(style = "verbose", code = "", applicability = "machine-applicable")] + pub no_mangle_span: Span, + #[note] + pub export_name_span: Span, + pub no_mangle_attr: &'static str, + pub export_name_attr: &'static str, +} + +#[derive(LintDiagnostic)] #[diag(passes_outer_crate_level_attr)] pub(crate) struct OuterCrateLevelAttr; |
