Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(specialization)]
- trait Foo
- {
- type Bar;
- fn test(arg: Self::Bar) where
- Self: Sized;
- }
- struct Baz<T>
- {
- qux: T
- }
- impl<T> Foo for Baz<T>
- {
- default type Bar = T;
- default fn test(arg: Self::Bar) where
- Self: Sized
- {
- Self
- {
- qux: arg
- };
- println!("test!");
- }
- }
- fn main()
- {
- }
Add Comment
Please, Sign In to add comment