rust/tests/ui/consts/const-size_of-cycle.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
1.1 KiB
Plaintext
Raw Normal View History

2022-06-02 19:42:29 +02:00
error[E0391]: cycle detected when evaluating type-level constant
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-08-31 10:40:14 +02:00
|
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `Foo::bytes::{constant#0}`...
--> $DIR/const-size_of-cycle.rs:4:17
|
LL | bytes: [u8; std::mem::size_of::<Foo>()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires computing layout of `Foo`...
= 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
--> $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`.