Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(existential_type)]
- use std::fmt::Display;
- fn main() {
- println!("Hello, world!");
- }
- trait Test {
- type Out: Display;
- fn test(&self) -> Self::Out;
- }
- impl Test for () {
- existential type Out: Display;
- fn test(&self) -> Self::Out {
- "abcd"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement