You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0391]: cycle detected when computing layout of `Foo`
2
+
|
3
+
= note: ...which requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`...
4
+
= note: ...which again requires computing layout of `Foo`, completing the cycle
5
+
note: cycle used when const-evaluating + checking `_`
6
+
--> $DIR/stack-overflow-trait-infer-98842.rs:12:1
7
+
|
8
+
LL | const _: *const Foo = 0 as _;
9
+
| ^^^^^^^^^^^^^^^^^^^
10
+
= 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
11
+
12
+
error[E0080]: it is undefined behavior to use this value
13
+
--> $DIR/stack-overflow-trait-infer-98842.rs:12:1
14
+
|
15
+
LL | const _: *const Foo = 0 as _;
16
+
| ^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
17
+
|
18
+
= note: the raw bytes of the constant (size: 8, align: 8) {
19
+
00 00 00 00 00 00 00 00 │ ........
20
+
}
21
+
22
+
error: aborting due to 2 previous errors
23
+
24
+
Some errors have detailed explanations: E0080, E0391.
25
+
For more information about an error, try `rustc --explain E0080`.
0 commit comments