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.2 KiB
Plaintext
Raw Normal View History

2022-06-02 17:42:29 +00: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 08:40:14 +00: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; std::mem::size_of::<Foo>()]`...
= note: ...which requires normalizing `[u8; std::mem::size_of::<Foo>()]`...
2022-06-02 17:42:29 +00:00
= note: ...which again requires evaluating type-level constant, completing the cycle
2020-05-31 15:11:51 +00:00
note: cycle used when checking that `Foo` is well-formed
--> $DIR/const-size_of-cycle.rs:3:1
2018-08-08 12:28:26 +00:00
|
2018-08-31 08:40:14 +00:00
LL | struct Foo {
| ^^^^^^^^^^
2018-08-08 12:28:26 +00:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0391`.