rust/tests/ui/sized/stack-overflow-trait-infer-...

26 lines
1.1 KiB
Plaintext

error[E0391]: cycle detected when computing layout of `Foo`
|
= note: ...which requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`...
= note: ...which again requires computing layout of `Foo`, completing the cycle
note: cycle used when const-evaluating + checking `_`
--> $DIR/stack-overflow-trait-infer-98842.rs:15:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^
= 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
error[E0080]: it is undefined behavior to use this value
--> $DIR/stack-overflow-trait-infer-98842.rs:15:1
|
LL | const _: *const Foo = 0 as _;
| ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
|
= note: the raw bytes of the constant (size: 4, align: 4) {
00 00 00 00 │ ....
}
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0080, E0391.
For more information about an error, try `rustc --explain E0080`.