rust/tests/ui/traits/issue-91594.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
336 B
Rust
Raw Normal View History

2021-12-27 00:09:19 -06:00
// #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() {}