rust/src/test/run-pass/mutable-huh-variance-vec2.rs
2011-11-16 13:52:08 -08:00

14 lines
277 B
Rust

// error-pattern: mismatched types
fn main() {
let v = [[0]];
// This is ok because the outer vec is covariant with respect
// to the inner vec. If the outer vec was mutable then we
// couldn't do this.
fn f(&&v: [const [const int]]) {
}
f(v);
}