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