about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/messages.ftl
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/messages.ftl
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/messages.ftl')
-rw-r--r--compiler/rustc_const_eval/messages.ftl11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/messages.ftl b/compiler/rustc_const_eval/messages.ftl
index b767ca9a3c2..04637884011 100644
--- a/compiler/rustc_const_eval/messages.ftl
+++ b/compiler/rustc_const_eval/messages.ftl
@@ -56,6 +56,17 @@ const_eval_const_context = {$kind ->
     *[other] {""}
 }
 
+const_eval_const_heap_ptr_in_final = encountered `const_allocate` pointer in final value that was not made global
+    .note = use `const_make_global` to make allocated pointers immutable before returning
+
+const_eval_const_make_global_ptr_already_made_global = attempting to call `const_make_global` twice on the same allocation {$alloc}
+
+const_eval_const_make_global_ptr_is_non_heap = pointer passed to `const_make_global` does not point to a heap allocation: {$ptr}
+
+const_eval_const_make_global_with_dangling_ptr = pointer passed to `const_make_global` is dangling: {$ptr}
+
+const_eval_const_make_global_with_offset = making {$ptr} global which does not point to the beginning of an object
+
 const_eval_copy_nonoverlapping_overlapping =
     `copy_nonoverlapping` called on overlapping ranges