Skip to content

Commit 0029823

Browse files
committed
Clarify why we are talking about a failed const eval at a random place
1 parent 29a6398 commit 0029823

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/fail/const-ub-checks.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: accessing memory based on pointer with alignment ALIGN, but alignm
22
--> tests/fail/const-ub-checks.rs:LL:CC
33
|
44
LL | ptr.read();
5-
| ^^^^^^^^^^ evaluation of constant value failed
5+
| ^^^^^^^^^^ evaluation of constant value failed here
66

77
note: erroneous constant encountered
88
--> tests/fail/const-ub-checks.rs:LL:CC

tests/fail/erroneous_const.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: evaluation panicked: explicit panic
22
--> tests/fail/erroneous_const.rs:LL:CC
33
|
44
LL | const VOID: ! = panic!();
5-
| ^^^^^^^^ evaluation of `PrintName::<i32>::VOID` failed
5+
| ^^^^^^^^ evaluation of `PrintName::<i32>::VOID` failed here
66

77
note: erroneous constant encountered
88
--> tests/fail/erroneous_const.rs:LL:CC

tests/fail/erroneous_const2.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0080]: attempt to compute `5_u32 - 6_u32`, which would overflow
22
--> tests/fail/erroneous_const2.rs:LL:CC
33
|
44
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
5-
| ^^^^^ evaluation of constant value failed
5+
| ^^^^^ evaluation of constant value failed here
66

77
note: erroneous constant encountered
88
--> tests/fail/erroneous_const2.rs:LL:CC

0 commit comments

Comments
 (0)