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