]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/universal_wrong_bounds.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / 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() {}