]> git.lizzy.rs Git - rust.git/blob - tests/ui/sized-cycle-note.stderr
Optimize `TyKind::eq`.
[rust.git] / tests / ui / sized-cycle-note.stderr
1 error[E0072]: recursive types `Baz` and `Foo` have infinite size
2   --> $DIR/sized-cycle-note.rs:1:1
3    |
4 LL | struct Baz { q: Option<Foo> }
5    | ^^^^^^^^^^             --- recursive without indirection
6 LL |
7 LL | struct Foo { q: Option<Baz> }
8    | ^^^^^^^^^^             --- recursive without indirection
9    |
10 help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
11    |
12 LL ~ struct Baz { q: Option<Box<Foo>> }
13 LL |
14 LL ~ struct Foo { q: Option<Box<Baz>> }
15    |
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0072`.