summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/issue-91594.rs
blob: 930f7f0c6ad6b363f8c05f93e25910086a07d1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// #91594: This used to ICE.

trait Component<M> {
    type Interface;
}
trait HasComponent<I> {}

struct Foo;

impl HasComponent<<Foo as Component<Foo>>::Interface> for Foo {}
//~^ ERROR the trait bound `Foo: HasComponent<()>` is not satisfied

impl<M: HasComponent<()>> Component<M> for Foo {
    type Interface = u8;
}

fn main() {}