summary refs log tree commit diff
path: root/src/test/run-pass/mutable-huh-variance-vec1.rs
blob: 23deca00fed1ce0d30c2b2389be3740252af849f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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);
}