@@ -739,7 +739,7 @@ pure fn type_is_unique(ty: t) -> bool {
739
739
pure fn type_is_scalar ( ty : t ) -> bool {
740
740
alt get ( ty) . struct {
741
741
ty_nil | ty_bool | ty_int ( _) | ty_float ( _) | ty_uint ( _) |
742
- ty_send_type | ty_type | ty_ptr ( _) { true }
742
+ ty_send_type | ty_type | ty_ptr ( _) | ty_rptr ( _ , _ ) { true }
743
743
_ { false }
744
744
}
745
745
}
@@ -760,7 +760,7 @@ fn type_needs_drop(cx: ctxt, ty: t) -> bool {
760
760
let result = alt get ( ty) . struct {
761
761
// scalar types
762
762
ty_nil | ty_bot | ty_bool | ty_int ( _) | ty_float ( _) | ty_uint ( _) |
763
- ty_type | ty_ptr ( _) { false }
763
+ ty_type | ty_ptr ( _) | ty_rptr ( _ , _ ) { false }
764
764
ty_rec ( flds) {
765
765
for f in flds { if type_needs_drop ( cx, f. mt . ty ) { accum = true ; } }
766
766
accum
@@ -852,6 +852,7 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
852
852
// Those with refcounts-to-inner raise pinned to shared,
853
853
// lower unique to shared. Therefore just set result to shared.
854
854
ty_box ( _) | ty_iface ( _, _) | ty_opaque_box { kind_copyable }
855
+ ty_rptr( _, _) { kind_copyable }
855
856
// Boxes and unique pointers raise pinned to shared.
856
857
ty_vec ( tm) | ty_uniq ( tm) { type_kind ( cx, tm. ty ) }
857
858
// Records lower to the lowest of their members.
@@ -1012,7 +1013,7 @@ fn type_is_pod(cx: ctxt, ty: t) -> bool {
1012
1013
ty_send_type | ty_type | ty_ptr ( _) { result = true ; }
1013
1014
// Boxed types
1014
1015
ty_str | ty_box ( _) | ty_uniq ( _) | ty_vec ( _) | ty_fn ( _) |
1015
- ty_iface ( _, _) | ty_opaque_box { result = false ; }
1016
+ ty_iface ( _, _) | ty_rptr ( _ , _ ) | ty_opaque_box { result = false ; }
1016
1017
// Structural types
1017
1018
ty_enum ( did, tps) {
1018
1019
let variants = enum_variants ( cx, did) ;
0 commit comments