summaryrefslogtreecommitdiff
path: root/src/tools/miri/tests/fail/layout_cycle.stderr
blob: 62b7d5fb77d12f3141a50952d6d64e67ed6fb521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
error[E0391]: cycle detected when computing layout of `S<S<()>>`
   |
   = note: ...which requires computing layout of `<S<()> as Tr>::I`...
   = note: ...which again requires computing layout of `S<S<()>>`, completing the cycle

error: post-monomorphization error: a cycle occurred during layout computation
  --> RUSTLIB/core/src/mem/mod.rs:LL:CC
   |
LL |     intrinsics::size_of::<T>()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ a cycle occurred during layout computation
   |
   = note: inside `std::mem::size_of::<S<S<()>>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
note: inside `foo::<S<()>>`
  --> $DIR/layout_cycle.rs:LL:CC
   |
LL |     mem::size_of::<S<T>>()
   |     ^^^^^^^^^^^^^^^^^^^^^^
note: inside `main`
  --> $DIR/layout_cycle.rs:LL:CC
   |
LL |     println!("{}", foo::<S<()>>());
   |                    ^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0391`.