Using both no_mangle and export_name attributes should cause a warning · Issue #47446 · rust-lang/rust (original) (raw)
In a simple example like:
#[no_mangle] #[export_name = "asdf"] pub extern fn foobar() {}
The actual exported name will be asdf
. It seems export_name
wins over no_mangle
however there is no warning letting you know this occurred. It seems there is no valid use for having both of these so it's probably worth warning about.
-B