dcefd6871d
Emit specific warning to clarify that `#[no_mangle]` should not be applied on foreign statics or functions Foreign statics and foreign functions should not have `#[no_mangle]` applied, as it does nothing to the name and has some extra hidden behavior that is normally unwanted. There was an existing warning for this, but it says the attribute is only allowed on "statics or functions", which to the user can be confusing. This PR adds a specific version of the unused `#[no_mangle]` warning that explains that the target is a *foreign* static or function and that they do not need the attribute. Fixes #78989 |
||
---|---|---|
.. | ||
liveness | ||
check_attr.rs | ||
check_const.rs | ||
dead.rs | ||
diagnostic_items.rs | ||
entry.rs | ||
hir_id_validator.rs | ||
hir_stats.rs | ||
intrinsicck.rs | ||
lang_items.rs | ||
layout_test.rs | ||
lib_features.rs | ||
lib.rs | ||
liveness.rs | ||
loops.rs | ||
naked_functions.rs | ||
reachable.rs | ||
region.rs | ||
stability.rs | ||
upvars.rs | ||
weak_lang_items.rs |