about summary refs log tree commit diff
path: root/src/test/compile-fail/mutable-huh-unique-assign.rs
blob: 6a0d81ca50b31a063fd2d3b4f030368fb4addbdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// error-pattern: assigning to immutable box

fn main() {
    fn f(&&v: ~const int) {
        // This shouldn't be possible
        *v = 1
    }

    let v = ~0;

    f(v);
}