From 17946c22b1d7abd2dd990bf6998c8491b534fe62 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 7 Jun 2025 11:32:09 +0200 Subject: const-eval error: always say in which item the error occurred also adjust the wording a little so that we don't say "the error occurred here" for two different spans --- src/tools/miri/tests/fail/const-ub-checks.stderr | 2 +- src/tools/miri/tests/fail/erroneous_const2.stderr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/miri/tests/fail/const-ub-checks.stderr b/src/tools/miri/tests/fail/const-ub-checks.stderr index 9bac524bd45..df2d5653d2d 100644 --- a/src/tools/miri/tests/fail/const-ub-checks.stderr +++ b/src/tools/miri/tests/fail/const-ub-checks.stderr @@ -2,7 +2,7 @@ error[E0080]: accessing memory based on pointer with alignment ALIGN, but alignm --> tests/fail/const-ub-checks.rs:LL:CC | LL | ptr.read(); - | ^^^^^^^^^^ evaluation of constant value failed here + | ^^^^^^^^^^ evaluation of `UNALIGNED_READ` failed here note: erroneous constant encountered --> tests/fail/const-ub-checks.rs:LL:CC diff --git a/src/tools/miri/tests/fail/erroneous_const2.stderr b/src/tools/miri/tests/fail/erroneous_const2.stderr index 9d3f1b13bee..08d2cc124f1 100644 --- a/src/tools/miri/tests/fail/erroneous_const2.stderr +++ b/src/tools/miri/tests/fail/erroneous_const2.stderr @@ -2,7 +2,7 @@ error[E0080]: attempt to compute `5_u32 - 6_u32`, which would overflow --> tests/fail/erroneous_const2.rs:LL:CC | LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; - | ^^^^^ evaluation of constant value failed here + | ^^^^^ evaluation of `FOO` failed here note: erroneous constant encountered --> tests/fail/erroneous_const2.rs:LL:CC -- cgit 1.4.1-3-g733a5