Skip to content

Instantly share code, notes, and snippets.

@aturon
Created March 16, 2015 21:42
Show Gist options
  • Save aturon/9f29e9edae931b87a84d to your computer and use it in GitHub Desktop.
Save aturon/9f29e9edae931b87a84d to your computer and use it in GitHub Desktop.
fn nonparametric<T: 'static>(t: T) {
let b: Box<Any> = box t;
match b.downcast::<SomeConcreteType>() {
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment