2011-10-17 22:51:34 -05:00
|
|
|
// error-pattern: mismatched types
|
|
|
|
|
|
|
|
use std;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = [0];
|
2011-12-13 18:25:51 -06:00
|
|
|
let v: *mutable [int] = ptr::mut_addr_of(a);
|
2011-10-17 22:51:34 -05:00
|
|
|
|
2011-11-16 16:41:32 -06:00
|
|
|
fn f(&&v: *mutable [const int]) {
|
2011-10-17 22:51:34 -05:00
|
|
|
unsafe {
|
|
|
|
*v = [mutable 3]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
f(v);
|
|
|
|
}
|