summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/universal_wrong_bounds.rs
blob: 2182506c7b71991c27192af037913757199ab55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::fmt::Display;

fn foo(f: impl Display + Clone) -> String {
    wants_debug(f);
    wants_display(f);
    wants_clone(f);
}

fn wants_debug(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug`
fn wants_display(g: impl Debug) { } //~ ERROR expected trait, found derive macro `Debug`
fn wants_clone(g: impl Clone) { }

fn main() {}