]> git.proxmox.com Git - rustc.git/blob - tests/ui/impl-trait/universal_wrong_bounds.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / impl-trait / universal_wrong_bounds.rs
1 use std::fmt::Display;
2
3 fn foo(f: impl Display + Clone) -> String {
4 wants_debug(f);
5 wants_display(f);
6 wants_clone(f);
7 }
8
9 fn wants_debug(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug`
10 fn wants_display(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug`
11 fn wants_clone(g: impl Clone) { }
12
13 fn main() {}