about summary refs log tree commit diff
path: root/compiler/rustc_passes/messages.ftl
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-24 23:05:45 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-26 08:50:42 +0200
commit3d1cee53244dce3a9e58e04c87ba8d02d964f79f (patch)
tree2370a72d097c42d9173078b0a1722c46b7a46265 /compiler/rustc_passes/messages.ftl
parent287d9afce729dd81fa9abfa860af31656d9c5e16 (diff)
downloadrust-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/messages.ftl')
-rw-r--r--compiler/rustc_passes/messages.ftl5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_passes/messages.ftl b/compiler/rustc_passes/messages.ftl
index f601d058b33..e2995daadfe 100644
--- a/compiler/rustc_passes/messages.ftl
+++ b/compiler/rustc_passes/messages.ftl
@@ -486,6 +486,11 @@ passes_missing_panic_handler =
 passes_missing_stability_attr =
     {$descr} has missing stability attribute
 
+passes_mixed_export_name_and_no_mangle = `{$no_mangle_attr}` attribute may not be used in combination with `{$export_name_attr}`
+    .label = `{$no_mangle_attr}` is ignored
+    .note = `{$export_name_attr}` takes precedence
+    .suggestion = remove the `{$no_mangle_attr}` attribute
+
 passes_multiple_rustc_main =
     multiple functions with a `#[rustc_main]` attribute
     .first = first `#[rustc_main]` function