1 // Regression test for #102800
3 // Here we are generating higher-ranked region constraints when normalizing and relating closure
4 // input types. Previously this was an ICE in the error path because we didn't register enough
5 // diagnostic information to render the higher-ranked subtyping error.
13 impl Trait for &'static () {
18 let _: for<'a> fn(<&'a () as Trait>::Ty) = |_| {};
19 //~^ ERROR lifetime may not live long enough
20 //~| ERROR higher-ranked subtype error
21 //~| ERROR higher-ranked subtype error
22 //~| ERROR implementation of `Trait` is not general enough
23 //~| ERROR implementation of `Trait` is not general enough
24 //~| ERROR implementation of `Trait` is not general enough
25 //~| ERROR implementation of `Trait` is not general enough
26 //~| ERROR implementation of `Trait` is not general enough
27 //~| ERROR implementation of `Trait` is not general enough
28 //~| ERROR implementation of `Trait` is not general enough
29 //~| ERROR implementation of `Trait` is not general enough
30 //~| ERROR implementation of `Trait` is not general enough