about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/errors.rs
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2025-07-08 00:20:57 +0800
committerDeadbeef <ent3rm4n@gmail.com>2025-07-16 00:32:12 +0800
commit3f2dc2bd1a2e0120b868911497ddbd8e43f3a9fa (patch)
tree1b7d0258d17ef7734220a679c8280d366bea8052 /compiler/rustc_const_eval/src/errors.rs
parent9c3064e131f4939cc95a29bb11413c49bbda1491 (diff)
downloadrust-3f2dc2bd1a2e0120b868911497ddbd8e43f3a9fa.tar.gz
rust-3f2dc2bd1a2e0120b868911497ddbd8e43f3a9fa.zip
add `const_make_global`; err for `const_allocate` ptrs if didn't call
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Oli Scherer <github333195615777966@oli-obk.de>
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
-rw-r--r--compiler/rustc_const_eval/src/errors.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index 49cd7138748..b6a64035261 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -44,6 +44,14 @@ pub(crate) struct MutablePtrInFinal {
 }
 
 #[derive(Diagnostic)]
+#[diag(const_eval_const_heap_ptr_in_final)]
+#[note]
+pub(crate) struct ConstHeapPtrInFinal {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(const_eval_unstable_in_stable_exposed)]
 pub(crate) struct UnstableInStableExposed {
     pub gate: String,