Add a simple test for exitential type

This commit is contained in:
Seiichi Uchida 2018-07-25 00:29:45 +09:00
parent 0131110c97
commit 6eb0bf2bb9
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,11 @@
// Existential type.
#![feature(existential_type)]
pub existential type Adder<F, T>
where
T: Clone,
F: Copy
: Fn(T) -> T;
pub existential type Adderrr<T>: Fn( T ) -> T;

View file

@ -0,0 +1,11 @@
// Existential type.
#![feature(existential_type)]
pub existential type Adder<F, T>
where
T: Clone,
F: Copy,
: Fn(T) -> T;
pub existential type Adderrr<T>: Fn(T) -> T;