about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/dont-consider-unconstrained-rpitits.rs
blob: fe73306966e627a2a2cfb2e56e235e76bdf1250e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// There's a suggestion that turns `Iterator<u32>` into `Iterator<Item = u32>`
// if we have more generics than the trait wants. Let's not consider RPITITs
// for this, since that makes no sense right now.

trait Foo {
    fn bar(self) -> impl Sized;
}

impl Foo<u8> for () {
    //~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied
    fn bar(self) -> impl Sized {}
}

fn main() {}