rust/compiler
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
..
rustc rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_apfloat rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_arena Remove unused arena macro args 2021-08-30 13:09:38 +02:00
rustc_ast Handle let-else initializer edge case errors 2021-08-30 20:18:42 -05:00
rustc_ast_lowering Auto merge of #87688 - camsteffen:let-else, r=cjgillot 2021-09-01 01:02:42 +00:00
rustc_ast_passes Rollup merge of #88418 - fee1-dead:trait-assoc-tilde-const, r=oli-obk 2021-08-31 17:54:56 +02:00
rustc_ast_pretty Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_attr Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
rustc_builtin_macros Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_codegen_cranelift rustc_target: TyAndLayout::field should never error. 2021-08-30 00:44:09 +03:00
rustc_codegen_llvm Auto merge of #88337 - eddyb:field-failure-is-not-an-option, r=nagisa 2021-08-29 22:54:26 +00:00
rustc_codegen_ssa Auto merge of #88506 - Mark-Simulacrum:fix-rlibs, r=ehuss 2021-08-31 19:33:06 +00:00
rustc_data_structures Rollup merge of #88492 - est31:maybe_uninit_write, r=wesleywiser 2021-08-31 10:41:26 +02:00
rustc_driver Reduce verbosity of RUSTC_LOG 2021-08-09 21:39:39 -04:00
rustc_error_codes feature(const_param_types) -> feature(adt_const_params) 2021-08-30 12:07:36 +02:00
rustc_errors Use if-let guards in the codebase 2021-08-25 20:24:35 +02:00
rustc_expand Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_feature Add let_else feature gate 2021-08-30 20:18:39 -05:00
rustc_fs_util rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_graphviz rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_hir Rollup merge of #88486 - bjorn3:better_arena_macro, r=jackh726 2021-08-31 10:41:25 +02:00
rustc_hir_pretty Remove obsolete MacroDef variant of OwnerNode 2021-08-28 00:24:30 -07:00
rustc_incremental Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
rustc_index rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_infer Enforce diverging let...else 2021-08-30 20:18:42 -05:00
rustc_interface don't generate partially-undef consts 2021-08-25 17:49:28 -04:00
rustc_lexer Fix more “a”/“an” typos 2021-08-22 17:27:18 +02:00
rustc_lint Auto merge of #87688 - camsteffen:let-else, r=cjgillot 2021-09-01 01:02:42 +00:00
rustc_lint_defs Tracking issue for UNSUPPORTED_CALLING_CONVENTIONS 2021-08-27 20:47:00 +03:00
rustc_llvm RustWrapper: adapt to LLVM change 0f45c16f2caa 2021-08-26 10:40:27 -04:00
rustc_macros Rollup merge of #86123 - Aaron1011:query-span, r=cjgillot 2021-08-19 19:30:04 +02:00
rustc_metadata Treat macros as HIR items 2021-08-28 00:16:34 -07:00
rustc_middle Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebank 2021-09-01 03:43:37 +00:00
rustc_mir Auto merge of #88533 - oli-obk:tait_🧊, r=spastorino 2021-08-31 22:15:26 +00:00
rustc_mir_build Handle irrufutable or unreachable let-else 2021-08-30 20:18:43 -05:00
rustc_parse Auto merge of #87688 - camsteffen:let-else, r=cjgillot 2021-09-01 01:02:42 +00:00
rustc_parse_format rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00
rustc_passes Rollup merge of #86376 - asquared31415:extern-no-mangle-84204, r=Mark-Simulacrum 2021-09-01 09:23:22 +02:00
rustc_plugin_impl Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
rustc_privacy rename const_evaluatable_checked to generic_const_exprs 2021-08-30 11:00:21 +02:00
rustc_query_impl Auto merge of #88121 - camelid:better-recursive-alias-error, r=estebank 2021-09-01 03:43:37 +00:00
rustc_query_system Note that trait aliases cannot be recursive 2021-08-27 14:50:52 -07:00
rustc_resolve Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_save_analysis Treat macros as HIR items 2021-08-28 00:16:34 -07:00
rustc_serialize Fix more “a”/“an” typos 2021-08-22 16:35:29 +02:00
rustc_session Remove Session.if_let_suggestions 2021-08-27 18:28:22 -05:00
rustc_span Auto merge of #87688 - camsteffen:let-else, r=cjgillot 2021-09-01 01:02:42 +00:00
rustc_symbol_mangling Rollup merge of #85534 - csmoe:demagnle-assert, r=michaelwoerister 2021-08-29 16:25:28 +02:00
rustc_target Disallow the aapcs CC on Aarch64 2021-08-30 13:46:07 +03:00
rustc_trait_selection Enforce diverging let...else 2021-08-30 20:18:42 -05:00
rustc_traits Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearth 2021-08-27 01:07:17 +00:00
rustc_ty_utils Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearth 2021-08-27 01:07:17 +00:00
rustc_type_ir update TypeFlags to deal with missing ct substs 2021-08-26 11:00:30 +02:00
rustc_typeck Auto merge of #87688 - camsteffen:let-else, r=cjgillot 2021-09-01 01:02:42 +00:00