Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustdefault and blanket implsSingle-choice MCQ

What does this blanket impl make true about the program?

trait Greet { fn greet(&self) -> String; } impl<T: std::fmt::Display> Greet for T { fn greet(&self) -> String { format!("Hi {}", self) } } fn main() { println!("{}", 42.greet()); println!("{}", "x".greet()); }