Skip to content

Commit 6eb0bf2

Browse files
committed
Add a simple test for exitential type
1 parent 0131110 commit 6eb0bf2

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/source/existential_type.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Existential type.
2+
3+
#![feature(existential_type)]
4+
5+
pub existential type Adder<F, T>
6+
where
7+
T: Clone,
8+
F: Copy
9+
: Fn(T) -> T;
10+
11+
pub existential type Adderrr<T>: Fn( T ) -> T;

tests/target/existential_type.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Existential type.
2+
3+
#![feature(existential_type)]
4+
5+
pub existential type Adder<F, T>
6+
where
7+
T: Clone,
8+
F: Copy,
9+
: Fn(T) -> T;
10+
11+
pub existential type Adderrr<T>: Fn(T) -> T;

0 commit comments

Comments
 (0)