summary refs log tree commit diff
path: root/src/test/run-pass/borrowck-wg-borrow-mut-to-imm.rs
blob: dea4ec4959b0068bac2449e9284a66c9088090b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}