From 03f6060e802e1acd8efe85b07bc98a97bf5caa7d Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Wed, 23 Nov 2011 13:25:26 +0100 Subject: [PATCH] Make type_kind properly recognize ty_ptr as sendable --- src/comp/middle/ty.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index e3615d697ba7..33d261dc83fd 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -986,7 +986,7 @@ fn type_kind(cx: ctxt, ty: t) -> ast::kind { let result = alt struct(cx, ty) { // Scalar and unique types are sendable ty_nil. | ty_bot. | ty_bool. | ty_int. | ty_uint. | ty_float. | - ty_machine(_) | ty_char. | ty_native(_) | + ty_machine(_) | ty_char. | ty_native(_) | ty_ptr(_) | ty_type. | ty_str. | ty_native_fn(_, _) { ast::kind_sendable } // FIXME: obj is broken for now, since we aren't asserting // anything about its fields. @@ -1003,8 +1003,8 @@ fn type_kind(cx: ctxt, ty: t) -> ast::kind { // Those with refcounts-to-inner raise pinned to shared, // lower unique to shared. Therefore just set result to shared. ty_box(mt) { ast::kind_copyable } - // Pointers and unique containers raise pinned to shared. - ty_ptr(tm) | ty_vec(tm) | ty_uniq(tm) { type_kind(cx, tm.ty) } + // Boxes and unique pointers raise pinned to shared. + ty_vec(tm) | ty_uniq(tm) { type_kind(cx, tm.ty) } // Records lower to the lowest of their members. ty_rec(flds) { let lowest = ast::kind_sendable;