summary refs log tree commit diff
path: root/src/test/run-pass/fixed_length_copy.rs
blob: 6e59537e4accaeb376daa6fbae28223ecb2ef55e (plain)
1
2
3
4
5
6
7
8
9
10

// error on implicit copies to check fixed length vectors
// are implicitly copyable 
#[warn(err_implicit_copies)]
fn main() {
    let arr = [1,2,3]/3;
    let arr2 = arr;
    assert(arr[1] == 2);
    assert(arr2[2] == 3);
}