]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/generic-impl-more-params-with-defaults.rs
Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum
[rust.git] / tests / ui / generics / generic-impl-more-params-with-defaults.rs
1 use std::marker;
2
3 struct Heap;
4
5 struct Vec<T, A = Heap>(
6     marker::PhantomData<(T,A)>);
7
8 impl<T, A> Vec<T, A> {
9     fn new() -> Vec<T, A> {Vec(marker::PhantomData)}
10 }
11
12 fn main() {
13     Vec::<isize, Heap, bool>::new();
14     //~^ ERROR this struct takes at most 2 generic arguments but 3 generic arguments were supplied
15 }