Skip to content

Commit 03f6060

Browse files
committed
Make type_kind properly recognize ty_ptr as sendable
1 parent 9fb3719 commit 03f6060

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/comp/middle/ty.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ fn type_kind(cx: ctxt, ty: t) -> ast::kind {
986986
let result = alt struct(cx, ty) {
987987
// Scalar and unique types are sendable
988988
ty_nil. | ty_bot. | ty_bool. | ty_int. | ty_uint. | ty_float. |
989-
ty_machine(_) | ty_char. | ty_native(_) |
989+
ty_machine(_) | ty_char. | ty_native(_) | ty_ptr(_) |
990990
ty_type. | ty_str. | ty_native_fn(_, _) { ast::kind_sendable }
991991
// FIXME: obj is broken for now, since we aren't asserting
992992
// anything about its fields.
@@ -1003,8 +1003,8 @@ fn type_kind(cx: ctxt, ty: t) -> ast::kind {
10031003
// Those with refcounts-to-inner raise pinned to shared,
10041004
// lower unique to shared. Therefore just set result to shared.
10051005
ty_box(mt) { ast::kind_copyable }
1006-
// Pointers and unique containers raise pinned to shared.
1007-
ty_ptr(tm) | ty_vec(tm) | ty_uniq(tm) { type_kind(cx, tm.ty) }
1006+
// Boxes and unique pointers raise pinned to shared.
1007+
ty_vec(tm) | ty_uniq(tm) { type_kind(cx, tm.ty) }
10081008
// Records lower to the lowest of their members.
10091009
ty_rec(flds) {
10101010
let lowest = ast::kind_sendable;

0 commit comments

Comments
 (0)