diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-11-23 13:25:26 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-11-23 13:27:04 +0100 |
| commit | 03f6060e802e1acd8efe85b07bc98a97bf5caa7d (patch) | |
| tree | b38f4d1c601ad379c7029e8357dbaf32fb2d6b2c /src/comp/middle | |
| parent | 9fb3719ded8d6938c21710d4b487ab1328c7dd5e (diff) | |
| download | rust-03f6060e802e1acd8efe85b07bc98a97bf5caa7d.tar.gz rust-03f6060e802e1acd8efe85b07bc98a97bf5caa7d.zip | |
Make type_kind properly recognize ty_ptr as sendable
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/ty.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index e3615d697ba..33d261dc83f 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; |
