about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-02 05:11:49 +0000
committerbors <bors@rust-lang.org>2023-06-02 05:11:49 +0000
commit33c3d101280c8eb3cd8af421bfb56a8afcc3881d (patch)
tree2e65db5c7568d3a9220cca76dec79c036a97d749 /compiler/rustc_codegen_llvm/src/errors.rs
parent774a3d1523bde3a16f8a92dbaac01d211ba911c3 (diff)
parentf6c2bc5c24fd08200c0e4438d981ca58dc71f488 (diff)
downloadrust-33c3d101280c8eb3cd8af421bfb56a8afcc3881d.tar.gz
rust-33c3d101280c8eb3cd8af421bfb56a8afcc3881d.zip
Auto merge of #111677 - fee1-dead-contrib:rustc_const_eval-translatable, r=oli-obk,RalfJung
Use translatable diagnostics in `rustc_const_eval`

This PR:

* adds a `no_span` parameter to `note` / `help` attributes when using `Subdiagnostic` to allow adding notes/helps without using a span
* has minor tweaks and changes to error messages
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/errors.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs
index 6a9173ab450..44869ced1ae 100644
--- a/compiler/rustc_codegen_llvm/src/errors.rs
+++ b/compiler/rustc_codegen_llvm/src/errors.rs
@@ -50,9 +50,15 @@ pub(crate) struct SymbolAlreadyDefined<'a> {
 }
 
 #[derive(Diagnostic)]
-#[diag(codegen_llvm_invalid_minimum_alignment)]
-pub(crate) struct InvalidMinimumAlignment {
-    pub err: String,
+#[diag(codegen_llvm_invalid_minimum_alignment_not_power_of_two)]
+pub(crate) struct InvalidMinimumAlignmentNotPowerOfTwo {
+    pub align: u64,
+}
+
+#[derive(Diagnostic)]
+#[diag(codegen_llvm_invalid_minimum_alignment_too_large)]
+pub(crate) struct InvalidMinimumAlignmentTooLarge {
+    pub align: u64,
 }
 
 #[derive(Diagnostic)]