summary refs log tree commit diff
path: root/src/test/compile-fail/mutable-huh-unique-assign.rs
blob: 1b9b7a22191cb45de34aa1a0975407023bf3ee04 (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);
}