• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use std::fmt::Display;
2 
foo(f: impl Display + Clone) -> String3 fn 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)9 fn wants_debug(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug`
wants_display(g: impl Debug)10 fn wants_display(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug`
wants_clone(g: impl Clone)11 fn wants_clone(g: impl Clone) { }
12 
main()13 fn main() {}
14