Traits Example 2
/* impl<T:Display> ToString for T { // --snip-- } */ fn main() { let s = 5.to_string(); assert_eq!("5", s); }
- Blanket implementation
/* impl<T:Display> ToString for T { // --snip-- } */ fn main() { let s = 5.to_string(); assert_eq!("5", s); }