summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/call-on-unimplemented-fn-ptr.rs
blob: 86490c724e0183627edac8e71b62e8a17ccd2eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct Foo;

trait Bar {}

impl Bar for Foo {}

fn needs_bar<T: Bar>(_: T) {}

fn blah(f: fn() -> Foo) {
    needs_bar(f);
    //~^ ERROR the trait bound `fn() -> Foo: Bar` is not satisfied
    //~| HELP use parentheses to call this function pointer
}

fn main() {}