@@ -2,29 +2,20 @@ error[E0391]: cycle detected when computing layout of `S<S<()>>`
22 |
33 = note: ...which requires computing layout of `<S<()> as Tr>::I`...
44 = note: ...which again requires computing layout of `S<S<()>>`, completing the cycle
5+ note: cycle used when const-evaluating + checking `core::mem::SizedTypeProperties::SIZE`
6+ --> RUSTLIB/core/src/mem/mod.rs:LL:CC
7+ |
8+ LL | const SIZE: usize = intrinsics::size_of::<Self>();
9+ | ^^^^^^^^^^^^^^^^^
510 = 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
611
7- error: post-monomorphization error : a cycle occurred during layout computation
12+ error[E0080] : a cycle occurred during layout computation
813 --> RUSTLIB/core/src/mem/mod.rs:LL:CC
914 |
10- LL | intrinsics::size_of::<T>()
11- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ post-monomorphization error occurred here
12- |
13- = note: BACKTRACE:
14- = note: inside `std::mem::size_of::<S<S<()>>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
15- note: inside `foo::<S<()>>`
16- --> tests/fail/layout_cycle.rs:LL:CC
17- |
18- LL | mem::size_of::<S<T>>()
19- | ^^^^^^^^^^^^^^^^^^^^^^
20- note: inside `main`
21- --> tests/fail/layout_cycle.rs:LL:CC
22- |
23- LL | println!("{}", foo::<S<()>>());
24- | ^^^^^^^^^^^^^^
25-
26- note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
15+ LL | const SIZE: usize = intrinsics::size_of::<Self>();
16+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `<S<S<()>> as std::mem::SizedTypeProperties>::SIZE` failed here
2717
2818error: aborting due to 2 previous errors
2919
30- For more information about this error, try `rustc --explain E0391`.
20+ Some errors have detailed explanations: E0080, E0391.
21+ For more information about an error, try `rustc --explain E0080`.
0 commit comments