about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-10 10:25:38 +0000
committerbors <bors@rust-lang.org>2024-12-10 10:25:38 +0000
commit499605271718bceaa629f0b954502c0040e4456b (patch)
treeb51977c7b9a0fe8cf76191f4e2ef1c71917bd510 /compiler/rustc_codegen_ssa/src/errors.rs
parentb597d2a099a1b5b79acef05175a9ac847047f8a1 (diff)
parent8434a6e2bbb3c4855f24e1a86de960dca26cadf9 (diff)
downloadrust-499605271718bceaa629f0b954502c0040e4456b.tar.gz
rust-499605271718bceaa629f0b954502c0040e4456b.zip
Auto merge of #134108 - fmease:rollup-tbtwm6j, r=fmease
Rollup of 10 pull requests

Successful merges:

 - #131558 (Lint on combining `#[no_mangle]` and `#[export_name]`)
 - #133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next)
 - #133456 (Add licenses + Run `cargo update`)
 - #133472 (Run TLS destructors for wasm32-wasip1-threads)
 - #133853 (use vendor sources by default on dist tarballs)
 - #133946 (coverage: Prefer to visit nodes whose predecessors have been visited)
 - #134010 (fix ICE on type error in promoted)
 - #134029 (coverage: Use a query to find counters/expressions that must be zero)
 - #134071 (Configure renovatebot)
 - #134102 (Miscellaneous fixes for nix-dev-shell)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/errors.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/errors.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs
index f93cb52ea3e..00f8654e670 100644
--- a/compiler/rustc_codegen_ssa/src/errors.rs
+++ b/compiler/rustc_codegen_ssa/src/errors.rs
@@ -10,7 +10,7 @@ use rustc_errors::codes::*;
 use rustc_errors::{
     Diag, DiagArgValue, DiagCtxtHandle, Diagnostic, EmissionGuarantee, IntoDiagArg, Level,
 };
-use rustc_macros::{Diagnostic, Subdiagnostic};
+use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
 use rustc_middle::ty::Ty;
 use rustc_middle::ty::layout::LayoutError;
 use rustc_span::{Span, Symbol};
@@ -1114,3 +1114,15 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for TargetFeatureDisableOrEnable<'_
 #[derive(Diagnostic)]
 #[diag(codegen_ssa_aix_strip_not_used)]
 pub(crate) struct AixStripNotUsed;
+
+#[derive(LintDiagnostic)]
+#[diag(codegen_ssa_mixed_export_name_and_no_mangle)]
+pub(crate) struct MixedExportNameAndNoMangle {
+    #[label]
+    pub no_mangle: Span,
+    pub no_mangle_attr: String,
+    #[note]
+    pub export_name: Span,
+    #[suggestion(style = "verbose", code = "", applicability = "machine-applicable")]
+    pub removal_span: Span,
+}