Add a simple test for exitential type
This commit is contained in:
parent
0131110c97
commit
6eb0bf2bb9
2 changed files with 22 additions and 0 deletions
11
tests/source/existential_type.rs
Normal file
11
tests/source/existential_type.rs
Normal 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;
|
11
tests/target/existential_type.rs
Normal file
11
tests/target/existential_type.rs
Normal 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;
|
Loading…
Reference in a new issue