fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
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`.