Created
December 23, 2014 16:00
-
-
Save kazimuth/7118c49d8a348bb3c5f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn foo(){} | |
fn main() { | |
// No error | |
let _: fn() = foo; | |
// fnp.rs:11:27: 11:36 error: mismatched types: expected `core::option::Option<fn()>`, found | |
// `core::option::Option<fn() {foo}>` (expected fn pointer, found fn item) | |
// fnp.rs:11 let _: Option<fn()> = Some(foo); | |
// ^~~~~~~~~ | |
let _: Option<fn()> = Some(foo); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment