Skip to content

Instantly share code, notes, and snippets.

@bstrie
Forked from wilkie/bug.rs
Created May 8, 2013 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bstrie/5537371 to your computer and use it in GitHub Desktop.
Save bstrie/5537371 to your computer and use it in GitHub Desktop.
pub enum Thing {
A(~Foo)
}
pub trait Foo {}
pub struct Struct;
impl Foo for Struct {}
pub fn new() -> Thing {
A(~Struct as ~Foo)
}
fn main() {
match new() {
A(a) => 0,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment