rust/tests/ui/generics/generic-impl-less-params-with-defaults.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
291 B
Rust
Raw Normal View History

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 struct takes at least 2 generic arguments but 1 generic argument
}