You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tweak output for note pointing at root cause of const error
```
error[E0080]: evaluation of constant value failed
--> $DIR/issue-81899.rs:4:24
|
LL | const _CONST: &[u8] = &f(&[], |_| {});
| ^^^^^^^^^^^^^^ panic: explicit panic
|
note: the evaluated program failed inside `f::<{closure@$DIR/issue-81899.rs:4:31: 4:34}>`
--> $DIR/issue-81899.rs:11:5
|
LL | panic!()
| ^^^^^^^^ the evaluated program failed here
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
```
note: the evaluated program failed inside `f::<{closure@$DIR/issue-81899.rs:4:31: 4:34}>`
8
8
--> $DIR/issue-81899.rs:11:5
9
9
|
10
10
LL | panic!()
11
-
| ^^^^^^^^
11
+
| ^^^^^^^^ the evaluated program failed here
12
12
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
note: the evaluated program failed inside `f::<{closure@$DIR/issue-88434-minimal-example.rs:3:25: 3:28}>`
8
8
--> $DIR/issue-88434-minimal-example.rs:10:5
9
9
|
10
10
LL | panic!()
11
-
| ^^^^^^^^
11
+
| ^^^^^^^^ the evaluated program failed here
12
12
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
Copy file name to clipboardExpand all lines: tests/ui/coherence/const-errs-dont-conflict-103369.stderr
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ error[E0080]: evaluation of constant value failed
4
4
LL | impl ConstGenericTrait<{my_fn(1)}> for () {}
5
5
| ^^^^^^^^ panic: Some error occurred
6
6
|
7
-
note: inside `my_fn`
7
+
note: the evaluated program failed inside `my_fn`
8
8
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
9
9
|
10
10
LL | panic!("Some error occurred");
11
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program failed here
12
12
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
13
13
14
14
error[E0080]: evaluation of constant value failed
@@ -17,11 +17,11 @@ error[E0080]: evaluation of constant value failed
17
17
LL | impl ConstGenericTrait<{my_fn(2)}> for () {}
18
18
| ^^^^^^^^ panic: Some error occurred
19
19
|
20
-
note: inside `my_fn`
20
+
note: the evaluated program failed inside `my_fn`
21
21
--> $DIR/const-errs-dont-conflict-103369.rs:10:5
22
22
|
23
23
LL | panic!("Some error occurred");
24
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program failed here
25
25
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
| ^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC10 which is only 4 bytes from the end of the allocation
note: the evaluated program failed inside `std::ptr::const_ptr::<impl *const u32>::add`
121
123
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
124
+
|
125
+
= note: the evaluated program failed here
122
126
123
127
error[E0080]: it is undefined behavior to use this value
124
128
--> $DIR/forbidden_slices.rs:57:1
@@ -172,8 +176,10 @@ error[E0080]: could not evaluate static initializer
172
176
LL | from_ptr_range(ptr..ptr.add(1))
173
177
| ^^^^^^^^^^ out-of-bounds pointer arithmetic: expected a pointer to 8 bytes of memory, but got ALLOC11+0x1 which is only 7 bytes from the end of the allocation
0 commit comments