1 use std::fmt::Display; 2 foo(f: impl Display + Clone) -> String3fn foo(f: impl Display + Clone) -> String { 4 wants_debug(f); 5 wants_display(f); 6 wants_clone(f); 7 } 8 wants_debug(g: impl Debug)9fn wants_debug(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug` wants_display(g: impl Debug)10fn wants_display(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug` wants_clone(g: impl Clone)11fn wants_clone(g: impl Clone) { } 12 main()13fn main() {} 14