blob: f735af5ba73225052ba2bb8dde0706d2d978fd0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// error-pattern: mismatched types
use std;
fn main() {
let a = [0];
let v: *mutable [int] = ptr::mut_addr_of(a);
fn f(&&v: *mutable [const int]) {
unsafe {
*v = [mutable 3]
}
}
f(v);
}
|