summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/refine-resolution-errors.rs
blob: 894f592d9e2049f897ced9fca68a5125a5a30109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// This is a non-regression test for issue #126670 where RPITIT refinement checking encountered
// errors during resolution and ICEd.

//@ edition: 2018

pub trait Mirror {
    type Assoc;
}
impl<T: ?Sized> Mirror for () {
    //~^ ERROR the type parameter `T` is not constrained
    type Assoc = T;
}

pub trait First {
    async fn first() -> <() as Mirror>::Assoc;
}

impl First for () {
    async fn first() {}
}

fn main() {}