13 lines
159 B
Rust
13 lines
159 B
Rust
fn g(x: &Option<int>) {
|
|
io::println(x.get().to_str());
|
|
}
|
|
|
|
fn f(x: &mut Option<int>) {
|
|
g(&*x);
|
|
}
|
|
|
|
pub fn main() {
|
|
let mut x = ~Some(3);
|
|
f(x);
|
|
}
|