Skip to content

Instantly share code, notes, and snippets.

@lilyball
Created April 4, 2014 05:59
Show Gist options
  • Save lilyball/9968948 to your computer and use it in GitHub Desktop.
Save lilyball/9968948 to your computer and use it in GitHub Desktop.
use std::cell::RefCell;
trait Foo {}
impl Foo for () {}
fn main() {
let foo: RefCell<~Foo> = RefCell::new(~() as ~Foo);
let fooref: &mut Foo = *&mut *foo.borrow_mut();
println!("{:?}", fooref);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment