mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 04:14:28 +00:00
Add a simple test for exitential type
This commit is contained in:
parent
0131110c97
commit
6eb0bf2bb9
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 New Issue
Block a user