rust/src/test/compile-fail/mutable-huh-variance-box.rs

12 lines
145 B
Rust
Raw Normal View History

// error-pattern: mismatched types
fn main() {
2012-03-26 20:35:18 -05:00
let v = @mut [0];
2012-03-26 20:35:18 -05:00
fn f(&&v: @mut [const int]) {
*v = [mut 3]
}
f(v);
}