Add assignment to unique box locals

Issue #409
This commit is contained in:
Brian Anderson 2011-09-22 13:36:37 -07:00
parent 268a9fe5fb
commit 67bac873e0
2 changed files with 9 additions and 0 deletions

View file

@ -1019,6 +1019,10 @@ fn type_kind(cx: ctxt, ty: t) -> ast::kind {
ty_box(mt) {
result = ast::kind_shared;
}
ty_uniq(mt) {
// FIXME (409): Calculate kind
result = ast::kind_unique;
}
// Pointers and unique boxes / vecs raise pinned to shared,
// otherwise pass through their pointee kind.
ty_ptr(tm) | ty_vec(tm) {

View file

@ -0,0 +1,5 @@
fn main() {
let i;
i = ~1;
assert *i == 1;
}