14 lines
271 B
Rust
14 lines
271 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 mut then we
|
|
// couldn't do this.
|
|
fn f(&&v: ~[~[const int]]) {
|
|
}
|
|
|
|
f(v);
|
|
}
|