1
- error[E0391]: cycle detected when evaluating type-level constant
1
+ error[E0391]: cycle detected when const- evaluating + checking `Foo::bytes::{ constant#0}`
2
2
--> $DIR/issue-44415.rs:6:17
3
3
|
4
4
LL | bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
- note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
7
+ = note: ...which requires computing layout of `Foo`...
8
+ = note: ...which requires computing layout of `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
9
+ = note: ...which requires normalizing `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
10
+ note: ...which requires evaluating type-level constant...
8
11
--> $DIR/issue-44415.rs:6:17
9
12
|
10
13
LL | bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
@@ -14,15 +17,12 @@ note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`..
14
17
|
15
18
LL | bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
16
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
- = note: ...which requires computing layout of `Foo`...
18
- = note: ...which requires computing layout of `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
19
- = note: ...which requires normalizing `[u8; unsafe { intrinsics::size_of::<Foo>() }]`...
20
- = note: ...which again requires evaluating type-level constant, completing the cycle
21
- note: cycle used when checking that `Foo` is well-formed
22
- --> $DIR/issue-44415.rs:5:1
20
+ = note: ...which again requires const-evaluating + checking `Foo::bytes::{constant#0}`, completing the cycle
21
+ note: cycle used when evaluating type-level constant
22
+ --> $DIR/issue-44415.rs:6:17
23
23
|
24
- LL | struct Foo {
25
- | ^^^^^^^^^^
24
+ LL | bytes: [u8; unsafe { intrinsics::size_of::<Foo>() }],
25
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
26
26
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
27
27
28
28
error: aborting due to previous error
0 commit comments