Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. struct Foo;
  2. struct Bar<T = ()>(T);
  3.  
  4. impl Foo {
  5. fn new() -> Self { Self }
  6. }
  7.  
  8. impl Bar {
  9. fn new() -> Self { unimplemented!() }
  10. }
  11.  
  12. fn main() {
  13. Foo::new();
  14. Bar::new();
  15. Foo::<>::new();
  16. Bar::<>::new();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement