summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/trivial_impl.rs
blob: 6ac8c744bc4555bf9705eaaf05b4d9cec9998bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! This test checks that we do need to implement
//! all members, even if their where bounds only hold
//! due to other impls.

trait Foo<T> {
    fn foo()
    where
        Self: Foo<()>;
}

impl Foo<()> for () {
    fn foo() {}
}

impl Foo<u32> for () {}
//~^ ERROR: not all trait items implemented, missing: `foo`

fn main() {}