1 2 3 4 5 6 7 8 9 10 11 12
fn g(x: &Option<int>) { println(x.get().to_str()); } fn f(x: &mut Option<int>) { g(&*x); } pub fn main() { let mut x = ~Some(3); f(x); }