Created
December 23, 2014 17:10
-
-
Save pmsanford/c60f2f3555cc30f3b1da to your computer and use it in GitHub Desktop.
This file contains 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 accepts_optional_fn_ptr(_test: Option<fn(int) -> int>) {} | |
fn test_int(_: int) -> int { 0i } | |
fn main() { | |
accepts_optional_fn_ptr(Some(test_int)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment