This is not really the same though, because the Rust version compiles after the bounds have been added: use std::fmt::Display; fn f<T: Display>(s: T) { println!("{}", s); } fn main() { f(7); } whereas there would be no…
This is not really the same though, because the Rust version compiles after the bounds have been added: use std::fmt::Display; fn f<T: Display>(s: T) { println!("{}", s); } fn main() { f(7); } whereas there would be no…