2015-02-12 09:29:52 -06:00
|
|
|
use std::marker;
|
|
|
|
|
2014-01-30 11:28:02 -06:00
|
|
|
struct Heap;
|
|
|
|
|
2015-02-12 09:29:52 -06:00
|
|
|
struct Vec<T, A = Heap>(
|
|
|
|
marker::PhantomData<(T,A)>);
|
2014-01-30 11:28:02 -06:00
|
|
|
|
2017-05-21 06:11:08 -05:00
|
|
|
impl<T, A> Vec<T, A> {
|
2015-02-12 09:29:52 -06:00
|
|
|
fn new() -> Vec<T, A> {Vec(marker::PhantomData)}
|
2014-01-30 11:28:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2015-01-08 04:54:35 -06:00
|
|
|
Vec::<isize, Heap, bool>::new();
|
2023-02-23 11:27:06 -06:00
|
|
|
//~^ ERROR struct takes at most 2 generic arguments but 3 generic arguments were supplied
|
2014-01-30 11:28:02 -06:00
|
|
|
}
|