rust/compiler/rustc_passes
Mara Bos dcefd6871d
Rollup merge of #86376 - asquared31415:extern-no-mangle-84204, r=Mark-Simulacrum
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
2021-09-01 09:23:22 +02:00
..
src Rollup merge of #86376 - asquared31415:extern-no-mangle-84204, r=Mark-Simulacrum 2021-09-01 09:23:22 +02:00
Cargo.toml Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00