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