blob: 260c16c17d4a2b8c662abc1f27c47be07072b727 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// 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 implementation of `Trait` is not general enough
//~| ERROR implementation of `Trait` is not general enough
}
|