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

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

16 lines
315 B
Rust
Raw Normal View History

use std::marker;
struct Heap;
struct Vec<T, A = Heap>(
marker::PhantomData<(T,A)>);
impl<T, A> Vec<T, A> {
fn new() -> Vec<T, A> {Vec(marker::PhantomData)}
}
fn main() {
Vec::<isize, Heap, bool>::new();
//~^ ERROR struct takes at most 2 generic arguments but 3 generic arguments were supplied
}