]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generics/generic-impl-less-params-with-defaults.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / generics / generic-impl-less-params-with-defaults.rs
1 use std::marker;
2
3 struct Foo<A, B, C = (A, B)>(
4     marker::PhantomData<(A,B,C)>);
5
6 impl<A, B, C> Foo<A, B, C> {
7     fn new() -> Foo<A, B, C> {Foo(marker::PhantomData)}
8 }
9
10 fn main() {
11     Foo::<isize>::new();
12     //~^ ERROR this struct takes at least 2 type arguments but only 1 type argument was supplied
13 }