Skip to content

Commit e81d3d8

Browse files
committed
---
yaml --- r: 13524 b: refs/heads/master c: 6e63e2f h: refs/heads/master v: v3
1 parent 1787863 commit e81d3d8

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: a56902304d5f1291eca67845fddc906950c53cdc
2+
refs/heads/master: 6e63e2fd5f4b081c706edc9f3fa1f6c02fab21c7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/trans/base.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,8 +1404,7 @@ fn copy_val_no_check(bcx: block, action: copy_action, dst: ValueRef,
14041404
ret bcx;
14051405
}
14061406
if ty::type_is_nil(t) || ty::type_is_bot(t) { ret bcx; }
1407-
if ty::type_is_boxed(t) || ty::type_is_vec(t) ||
1408-
ty::type_is_unique_box(t) {
1407+
if ty::type_is_boxed(t) || ty::type_is_unique(t) {
14091408
if action == DROP_EXISTING { bcx = drop_ty(bcx, dst, t); }
14101409
Store(bcx, src, dst);
14111410
ret take_ty(bcx, dst, t);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
// error on implicit copies to check fixed length vectors
3+
// are implicitly copyable
4+
#[warn(err_implicit_copies)]
5+
fn main() {
6+
let arr = [1,2,3]/3;
7+
let arr2 = arr;
8+
assert(arr[1] == 2);
9+
assert(arr2[2] == 3);
10+
}

0 commit comments

Comments
 (0)