]> git.proxmox.com Git - rustc.git/blame - src/test/ui/recursion/issue-26548-recursion-via-normalize.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / recursion / issue-26548-recursion-via-normalize.rs
CommitLineData
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
8trait Mirror {
9 type It: ?Sized;
10}
11impl<T: ?Sized> Mirror for T {
12 type It = Self;
13}
92a42be0
SL
14struct S(Option<<S as Mirror>::It>);
15
f9f354fc 16fn main() {
5e7ed085 17 //~^ NOTE cycle used when elaborating drops for `main`
92a42be0
SL
18 let _s = S(None);
19}