fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
691 B21 linesraw
1error[E0277]: the trait bound `fn() -> Foo: Bar` is not satisfied
2  --> $DIR/call-on-unimplemented-fn-ptr.rs:10:15
3   |
4LL |     needs_bar(f);
5   |     --------- ^ the trait `Bar` is not implemented for `fn() -> Foo`
6   |     |
7   |     required by a bound introduced by this call
8   |
9note: required by a bound in `needs_bar`
10  --> $DIR/call-on-unimplemented-fn-ptr.rs:7:17
11   |
12LL | fn needs_bar<T: Bar>(_: T) {}
13   |                 ^^^ required by this bound in `needs_bar`
14help: use parentheses to call this function pointer
15   |
16LL |     needs_bar(f());
17   |                ++
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0277`.