Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Foo {
- fn bar(&self) -> &'static str {
- "sup"
- }
- }
- type Bar = ();
- impl Foo for Bar {}
- fn main() {
- let b: Bar = ();
- println!("{}", b.bar());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement