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.

26 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-07-12 22:59:01 -04: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 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 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 {
| ^^^^^^^^^^
= 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
2018-08-08 14:28:26 +02:00
error: aborting due to 1 previous error
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0391`.