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

12 lines
154 B
Rust
Raw Normal View History

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