about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/messages.ftl
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-08 23:18:34 +0000
committerbors <bors@rust-lang.org>2025-06-08 23:18:34 +0000
commitc31cccb7b5cc098b1a8c1794ed38d7fdbec0ccb0 (patch)
tree32178005ddb8db29ee196a77d75fae8e8030aa9c /compiler/rustc_const_eval/messages.ftl
parent6ccd4476036edfce364e6271f9e190ec7a2a1ff5 (diff)
parent17946c22b1d7abd2dd990bf6998c8491b534fe62 (diff)
downloadrust-c31cccb7b5cc098b1a8c1794ed38d7fdbec0ccb0.tar.gz
rust-c31cccb7b5cc098b1a8c1794ed38d7fdbec0ccb0.zip
Auto merge of #142008 - RalfJung:const-eval-error-here, r=oli-obk
const-eval error: always say in which item the error occurred

I don't see why "is this generic" should make a difference. It may be reasonable to key this on whether the error occurs in a `const fn` that was invoked by a const (making it non-obvious which constant it is) vs inside the body of the const.

r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_const_eval/messages.ftl')
-rw-r--r--compiler/rustc_const_eval/messages.ftl8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/messages.ftl b/compiler/rustc_const_eval/messages.ftl
index 5bce6fb7ab2..7f9abe8aa8e 100644
--- a/compiler/rustc_const_eval/messages.ftl
+++ b/compiler/rustc_const_eval/messages.ftl
@@ -88,11 +88,9 @@ const_eval_division_overflow =
 const_eval_dyn_call_not_a_method =
     `dyn` call trying to call something that is not a method
 
-const_eval_error = {$error_kind ->
-    [static] evaluation of static initializer failed here
-    [const] evaluation of constant value failed here
-    [const_with_path] evaluation of `{$instance}` failed here
-    *[other] {""}
+const_eval_error = evaluation of `{$instance}` failed {$num_frames ->
+    [0] here
+    *[other] inside this call
 }
 
 const_eval_exact_div_has_remainder =