summary refs log tree commit diff
path: root/src/test/run-pass/borrowck-wg-borrow-mut-to-imm.rs
blob: 668f602b3d35c941770d07d920c29f7c04bdab7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
fn g(x: &Option<int>) {
    println(x.unwrap().to_str());
}

fn f(x: &mut Option<int>) {
    g(&*x);
}

pub fn main() {
    let mut x = ~Some(3);
    f(x);
}