Skip to content

Instantly share code, notes, and snippets.

@eholk
Created July 18, 2012 22:20
Show Gist options
  • Select an option

  • Save eholk/3139303 to your computer and use it in GitHub Desktop.

Select an option

Save eholk/3139303 to your computer and use it in GitHub Desktop.
fn test() {
macro_rules! lambda {
{ $x:ident => $e:expr } => {|$x| $e}
}
fn foo(_f: fn(int) -> int) { fail }
foo(lambda!{x => x});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment