2021-08-24 18:29:30 +00:00
|
|
|
//~ ERROR cycle detected when computing layout of `S`
|
2021-09-20 16:22:55 +00:00
|
|
|
//~| NOTE ...which requires computing layout of `core::option::Option<<S as Mirror>::It>`...
|
|
|
|
//~| NOTE ...which requires computing layout of `core::option::Option<S>`...
|
2021-08-24 18:29:30 +00:00
|
|
|
//~| NOTE ...which again requires computing layout of `S`, completing the cycle
|
2016-06-20 20:55:14 +00:00
|
|
|
|
2019-12-14 03:28:32 +00:00
|
|
|
// build-fail
|
|
|
|
|
2020-05-31 15:11:51 +00:00
|
|
|
trait Mirror {
|
|
|
|
type It: ?Sized;
|
|
|
|
}
|
|
|
|
impl<T: ?Sized> Mirror for T {
|
|
|
|
type It = Self;
|
|
|
|
}
|
2015-10-25 21:02:15 +00:00
|
|
|
struct S(Option<<S as Mirror>::It>);
|
|
|
|
|
2020-05-31 15:11:51 +00:00
|
|
|
fn main() {
|
2022-03-08 17:20:31 +00:00
|
|
|
//~^ NOTE cycle used when elaborating drops for `main`
|
2015-10-25 21:02:15 +00:00
|
|
|
let _s = S(None);
|
|
|
|
}
|