Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait Foo {
- fn foo();
- }
- impl Foo for Vec<u8> {
- fn foo() { println!("u8"); }
- }
- impl Foo for Vec<usize> {
- fn foo() { println!("usize"); }
- }
- fn main() {
- // Error: Rust doesn't konw the type.
- // Vec::foo();
- Vec::<u8>::foo();
- Vec::<usize>::foo();
- }
Add Comment
Please, Sign In to add comment