]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/generic-impl-less-params-with-defaults.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / 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 generic arguments but 1 generic argument
13 }