parent
268a9fe5fb
commit
67bac873e0
2 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
5
src/test/run-pass/unique-assign.rs
Normal file
5
src/test/run-pass/unique-assign.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fn main() {
|
||||
let i;
|
||||
i = ~1;
|
||||
assert *i == 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue