2022-06-02 19:42:29 +02:00
|
|
|
error[E0391]: cycle detected when evaluating type-level constant
|
2020-04-01 04:10:13 +03:00
|
|
|
--> $DIR/const-size_of-cycle.rs:4:17
|
2018-08-26 15:19:34 +02:00
|
|
|
|
|
|
|
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-08-31 10:40:14 +02:00
|
|
|
|
|
2022-02-16 10:56:01 +01:00
|
|
|
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
|
2020-04-01 04:10:13 +03:00
|
|
|
--> $DIR/const-size_of-cycle.rs:4:17
|
2019-08-23 00:48:52 +02:00
|
|
|
|
|
|
|
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-08-31 18:11:44 +01:00
|
|
|
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
|
2020-04-01 04:10:13 +03:00
|
|
|
--> $DIR/const-size_of-cycle.rs:4:17
|
2019-11-11 14:32:36 +00:00
|
|
|
|
|
|
|
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-11-25 13:05:06 -08:00
|
|
|
= note: ...which requires computing layout of `Foo`...
|
2021-08-24 21:29:30 +03:00
|
|
|
= note: ...which requires computing layout of `[u8; _]`...
|
2020-03-24 11:24:24 +01:00
|
|
|
= note: ...which requires normalizing `[u8; _]`...
|
2022-06-02 19:42:29 +02:00
|
|
|
= note: ...which again requires evaluating type-level constant, completing the cycle
|
2020-05-31 16:11:51 +01:00
|
|
|
note: cycle used when checking that `Foo` is well-formed
|
2020-04-01 04:10:13 +03:00
|
|
|
--> $DIR/const-size_of-cycle.rs:3:1
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2018-08-31 10:40:14 +02:00
|
|
|
LL | struct Foo {
|
|
|
|
| ^^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0391`.
|