2011-10-17 20:51:34 -07:00
|
|
|
// error-pattern: mismatched types
|
|
|
|
|
2012-09-11 17:46:20 -07:00
|
|
|
extern mod std;
|
2011-10-17 20:51:34 -07:00
|
|
|
|
|
|
|
fn main() {
|
2012-06-29 16:26:56 -07:00
|
|
|
let a = ~[0];
|
2012-09-28 21:51:14 -07:00
|
|
|
let v: *mut ~[int] = ptr::mut_addr_of(&a);
|
2011-10-17 20:51:34 -07:00
|
|
|
|
2012-06-29 16:26:56 -07:00
|
|
|
fn f(&&v: *mut ~[const int]) {
|
2011-10-17 20:51:34 -07:00
|
|
|
unsafe {
|
2012-06-29 16:26:56 -07:00
|
|
|
*v = ~[mut 3]
|
2011-10-17 20:51:34 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
f(v);
|
|
|
|
}
|