about summary refs log tree commit diff
path: root/compiler/rustc_error_messages
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-07 10:24:59 +0000
committerbors <bors@rust-lang.org>2022-12-07 10:24:59 +0000
commit91b8f34ac2272e3c94a97bebc033abe8e2f17101 (patch)
tree4c3707513fc8c10ed0e6da178cd9be923f4a24df /compiler/rustc_error_messages
parentec28f5338b8e54fa8ae3c18bf101c809c337f1f5 (diff)
parentb4278b02a7e6ad814c09bbc6c066c1713171fe82 (diff)
downloadrust-91b8f34ac2272e3c94a97bebc033abe8e2f17101.tar.gz
rust-91b8f34ac2272e3c94a97bebc033abe8e2f17101.zip
Auto merge of #104799 - pcc:linkage-fn, r=tmiasko
Support Option and similar enums as type of static variable with linkage attribute

Compiler MCP:
rust-lang/compiler-team#565
Diffstat (limited to 'compiler/rustc_error_messages')
-rw-r--r--compiler/rustc_error_messages/locales/en-US/codegen_gcc.ftl3
-rw-r--r--compiler/rustc_error_messages/locales/en-US/codegen_llvm.ftl3
-rw-r--r--compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl3
3 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_error_messages/locales/en-US/codegen_gcc.ftl b/compiler/rustc_error_messages/locales/en-US/codegen_gcc.ftl
index a1b7afeb709..08ce5172574 100644
--- a/compiler/rustc_error_messages/locales/en-US/codegen_gcc.ftl
+++ b/compiler/rustc_error_messages/locales/en-US/codegen_gcc.ftl
@@ -1,6 +1,3 @@
-codegen_gcc_linkage_const_or_mut_type =
-    must have type `*const T` or `*mut T` due to `#[linkage]` attribute
-
 codegen_gcc_unwinding_inline_asm =
     GCC backend does not support unwinding from inline asm
 
diff --git a/compiler/rustc_error_messages/locales/en-US/codegen_llvm.ftl b/compiler/rustc_error_messages/locales/en-US/codegen_llvm.ftl
index e273476b60b..97198cb4be2 100644
--- a/compiler/rustc_error_messages/locales/en-US/codegen_llvm.ftl
+++ b/compiler/rustc_error_messages/locales/en-US/codegen_llvm.ftl
@@ -23,9 +23,6 @@ codegen_llvm_branch_protection_requires_aarch64 =
 codegen_llvm_invalid_minimum_alignment =
     invalid minimum global alignment: {$err}
 
-codegen_llvm_linkage_const_or_mut_type =
-    must have type `*const T` or `*mut T` due to `#[linkage]` attribute
-
 codegen_llvm_sanitizer_memtag_requires_mte =
     `-Zsanitizer=memtag` requires `-Ctarget-feature=+mte`
 
diff --git a/compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl b/compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl
index a5cb8a88819..a9ea161b93e 100644
--- a/compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl
+++ b/compiler/rustc_error_messages/locales/en-US/hir_analysis.ftl
@@ -115,3 +115,6 @@ hir_analysis_const_bound_for_non_const_trait =
 hir_analysis_self_in_impl_self =
     `Self` is not valid in the self type of an impl block
     .note = replace `Self` with a different type
+
+hir_analysis_linkage_type =
+    invalid type for variable with `#[linkage]` attribute