]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | //~ ERROR cycle detected when computing layout of `S` |
c295e0f8 XL |
2 | //~| NOTE ...which requires computing layout of `core::option::Option<<S as Mirror>::It>`... |
3 | //~| NOTE ...which requires computing layout of `core::option::Option<S>`... | |
94222f64 | 4 | //~| NOTE ...which again requires computing layout of `S`, completing the cycle |
3157f602 | 5 | |
dfeec247 XL |
6 | // build-fail |
7 | ||
f9f354fc XL |
8 | trait Mirror { |
9 | type It: ?Sized; | |
10 | } | |
11 | impl<T: ?Sized> Mirror for T { | |
12 | type It = Self; | |
13 | } | |
92a42be0 SL |
14 | struct S(Option<<S as Mirror>::It>); |
15 | ||
f9f354fc | 16 | fn main() { |
5e7ed085 | 17 | //~^ NOTE cycle used when elaborating drops for `main` |
92a42be0 SL |
18 | let _s = S(None); |
19 | } |