fork/rust

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

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

master
628 B17 linesraw
1error[E0308]: mismatched types
2  --> $DIR/static-reference-to-fn-1.rs:17:15
3   |
4LL |         func: &foo,
5   |               ^^^^ expected `&fn() -> Option<isize>`, found `&fn() -> Option<isize> {foo}`
6   |
7   = note: expected reference `&fn() -> Option<isize>`
8              found reference `&fn() -> Option<isize> {foo}`
9   = note: fn items are distinct from fn pointers
10help: consider casting to a fn pointer
11   |
12LL |         func: &(foo as fn() -> Option<isize>),
13   |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0308`.