Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(specialization)]
- use std::fmt::Debug;
- trait Foo {
- type Bar;
- }
- impl<T: Debug> Foo for T {
- default type Bar = bool;
- }
- impl Foo for u32 {
- type Bar = ();
- }
- fn foo<T: Foo<Bar = bool>>() { }
- fn main() {
- foo::<i32>();
- }
Add Comment
Please, Sign In to add comment