Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. trait Foo {
  2. fn bar(&self) -> &'static str {
  3. "sup"
  4. }
  5. }
  6.  
  7. type Bar = ();
  8.  
  9. impl Foo for Bar {}
  10.  
  11. fn main() {
  12. let b: Bar = ();
  13. println!("{}", b.bar());
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement