summary refs log tree commit diff
path: root/src/test/run-pass/borrowck-wg-borrow-mut-to-imm.rs
blob: 3b18a8649eeeaac16d91727ded6bed6306ba45c6 (plain)
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);
}