1
Fork 0

Add a test that unique boxes in vectors are copied when the vector is

Issue #409
This commit is contained in:
Brian Anderson 2011-09-26 17:16:34 -07:00
parent a88d9effbc
commit 2d5e085eb9

View file

@ -0,0 +1,13 @@
fn main() {
let a = [~mutable 10];
let b = a;
assert *a[0] == 10;
assert *b[0] == 10;
// This should only modify the value in a, not b
*a[0] = 20;
assert *a[0] == 20;
assert *b[0] == 10;
}