]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/call-on-unimplemented-fn-ptr.rs
Rollup merge of #107559 - WaffleLapkin:is_it_2015¿, r=davidtwco
[rust.git] / tests / ui / suggestions / call-on-unimplemented-fn-ptr.rs
1 struct Foo;
2
3 trait Bar {}
4
5 impl Bar for Foo {}
6
7 fn needs_bar<T: Bar>(_: T) {}
8
9 fn blah(f: fn() -> Foo) {
10     needs_bar(f);
11     //~^ ERROR the trait bound `fn() -> Foo: Bar` is not satisfied
12     //~| HELP use parentheses to call this function pointer
13 }
14
15 fn main() {}