]> git.proxmox.com Git - rustc.git/blob - src/test/ui/suggestions/call-on-unimplemented-fn-ptr.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / 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() {}