Skip to content

Commit 7a76323

Browse files
committed
Allow vectors to contain unique boxes. Closes #952
Issue #409
1 parent e372f94 commit 7a76323

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/comp/middle/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ fn type_is_pod(cx: ctxt, ty: t) -> bool {
12351235
result = true;
12361236
}
12371237
// Boxed types
1238-
ty_str. | ty_box(_) | ty_vec(_) | ty_fn(_, _, _, _, _) |
1238+
ty_str. | ty_box(_) | ty_uniq(_) | ty_vec(_) | ty_fn(_, _, _, _, _) |
12391239
ty_native_fn(_, _, _) | ty_obj(_) {
12401240
result = false;
12411241
}

src/test/run-pass/unique-in-vec.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
assert [~100][0] == ~100;
3+
}

0 commit comments

Comments
 (0)