Skip to content

Instantly share code, notes, and snippets.

@alexcrichton
Created July 27, 2013 06:53
Show Gist options
  • Save alexcrichton/6094034 to your computer and use it in GitHub Desktop.
Save alexcrichton/6094034 to your computer and use it in GitHub Desktop.
pub type Chunk<'self> = (extern "Rust" fn(&util::Void, &mut super::Formatter),
&'self util::Void);
pub fn chunk<'a, T>(f: extern "Rust" fn(&T, &mut super::Formatter),
t: &'a T) -> Chunk<'a> {
unsafe {
return cast::transmute((f, t));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment