Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct Foo<A: Default, B: Default>(A, B);
- impl<A: Default, B: Default> Foo<A, B> {
- fn new(a: A) -> Self { Foo(a, B::default()) }
- }
- pub type Bar<A, B=usize> = Foo<A, B>;
- fn main() {
- let bar = Bar::new(42);
- }
Add Comment
Please, Sign In to add comment