]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-size_of-cycle.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-size_of-cycle.stderr
1 error[E0391]: cycle detected when evaluating type-level constant
2 --> $DIR/const-size_of-cycle.rs:4:17
3 |
4 LL | bytes: [u8; std::mem::size_of::<Foo>()]
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6 |
7 note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
8 --> $DIR/const-size_of-cycle.rs:4:17
9 |
10 LL | bytes: [u8; std::mem::size_of::<Foo>()]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
12 note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
13 --> $DIR/const-size_of-cycle.rs:4:17
14 |
15 LL | bytes: [u8; std::mem::size_of::<Foo>()]
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
17 = note: ...which requires computing layout of `Foo`...
18 = note: ...which requires computing layout of `[u8; _]`...
19 = note: ...which requires normalizing `[u8; _]`...
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/const-size_of-cycle.rs:3:1
23 |
24 LL | struct Foo {
25 | ^^^^^^^^^^
26
27 error: aborting due to previous error
28
29 For more information about this error, try `rustc --explain E0391`.