summary refs log tree commit diff
path: root/src/test/compile-fail/mutable-huh-box-assign.rs
blob: c9484e62c1eb0612c51dd28f8a762783090e6a9c (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    fn f(&&v: @const int) {
        *v = 1 //~ ERROR assigning to dereference of const @ pointer
    }

    let v = @0;

    f(v);
}