diff options
| author | bors <bors@rust-lang.org> | 2025-06-08 23:18:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-08 23:18:34 +0000 |
| commit | c31cccb7b5cc098b1a8c1794ed38d7fdbec0ccb0 (patch) | |
| tree | 32178005ddb8db29ee196a77d75fae8e8030aa9c /src/tools | |
| parent | 6ccd4476036edfce364e6271f9e190ec7a2a1ff5 (diff) | |
| parent | 17946c22b1d7abd2dd990bf6998c8491b534fe62 (diff) | |
| download | rust-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 'src/tools')
| -rw-r--r-- | src/tools/miri/tests/fail/const-ub-checks.stderr | 2 | ||||
| -rw-r--r-- | src/tools/miri/tests/fail/erroneous_const2.stderr | 2 |
2 files changed, 2 insertions, 2 deletions
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 |
