2011-10-17 22:51:34 -05:00
|
|
|
// error-pattern: mismatched types
|
|
|
|
|
|
|
|
use std;
|
|
|
|
|
|
|
|
fn main() {
|
2012-06-25 22:00:46 -05:00
|
|
|
let a = [0]/~;
|
|
|
|
let v: *mut [int]/~ = ptr::mut_addr_of(a);
|
2011-10-17 22:51:34 -05:00
|
|
|
|
2012-06-25 22:00:46 -05:00
|
|
|
fn f(&&v: *mut [const int]/~) {
|
2011-10-17 22:51:34 -05:00
|
|
|
unsafe {
|
2012-06-25 22:00:46 -05:00
|
|
|
*v = [mut 3]/~
|
2011-10-17 22:51:34 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
f(v);
|
|
|
|
}
|