rust/compiler/rustc_passes/src
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
..
liveness
check_attr.rs emit specific warning to clarify that foreign items can't have no_mangle 2021-08-29 20:22:19 -04:00
check_const.rs Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
dead.rs Fix dead code warning when inline const is used in pattern 2021-08-14 22:58:04 +01:00
diagnostic_items.rs Treat macros as HIR items 2021-08-28 00:16:34 -07:00
entry.rs Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisa 2021-08-01 09:15:15 +00:00
hir_id_validator.rs
hir_stats.rs Treat macros as HIR items 2021-08-28 00:16:34 -07:00
intrinsicck.rs Forbid ! from being used in asm! output 2021-08-12 20:28:35 +01:00
lang_items.rs Auto merge of #87875 - asquared31415:generic-lang-items, r=cjgillot 2021-08-25 08:12:16 +00:00
layout_test.rs rustc_target: add lifetime parameter to LayoutOf. 2021-08-27 13:09:32 +03:00
lib_features.rs Treat macros as HIR items 2021-08-28 00:16:34 -07:00
lib.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
liveness.rs Auto merge of #84333 - tmiasko:liveness-yield, r=tmandry 2021-08-25 05:31:26 +00:00
loops.rs
naked_functions.rs Introduce hir::ExprKind::Let - Take 2 2021-08-15 16:18:26 -03:00
reachable.rs Remove obsolete MacroDef variant of OwnerNode 2021-08-28 00:24:30 -07:00
region.rs Use correct drop scopes for if expressions 2021-08-15 16:05:25 -03:00
stability.rs Treat macros as HIR items 2021-08-28 00:16:34 -07:00
upvars.rs
weak_lang_items.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00