Skip to content

Commit

Permalink
Allow vectors to contain unique boxes. Closes #952
Browse files Browse the repository at this point in the history
Issue #409
  • Loading branch information
brson committed Sep 23, 2011
1 parent e372f94 commit 7a76323
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/comp/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ fn type_is_pod(cx: ctxt, ty: t) -> bool {
result = true;
}
// Boxed types
ty_str. | ty_box(_) | ty_vec(_) | ty_fn(_, _, _, _, _) |
ty_str. | ty_box(_) | ty_uniq(_) | ty_vec(_) | ty_fn(_, _, _, _, _) |
ty_native_fn(_, _, _) | ty_obj(_) {
result = false;
}
Expand Down
3 changes: 3 additions & 0 deletions src/test/run-pass/unique-in-vec.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
assert [~100][0] == ~100;
}

0 comments on commit 7a76323

Please sign in to comment.