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

12 lines
157 B
Rust
Raw Normal View History

// error-pattern: mismatched types
fn main() {
let v = ~mutable [0];
2011-11-16 14:41:32 -08:00
fn f(&&v: ~mutable [const int]) {
*v = [mutable 3]
}
f(v);
}