summary refs log tree commit diff
path: root/src/test/ui/generics/generic-impl-less-params-with-defaults.rs
blob: 01964f652ee090f30bb36b45b1dde405014a43a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::marker;

struct Foo<A, B, C = (A, B)>(
    marker::PhantomData<(A,B,C)>);

impl<A, B, C> Foo<A, B, C> {
    fn new() -> Foo<A, B, C> {Foo(marker::PhantomData)}
}

fn main() {
    Foo::<isize>::new();
    //~^ ERROR this struct takes at least 2 type arguments but only 1 type argument was supplied
}