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

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