@@ -1434,14 +1434,8 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
1434
1434
ty_ptr( _) { kind_implicitly_sendable( ) | kind_const( ) }
1435
1435
// FIXME: this *shouldn't* be implicitly copyable (#2450)
1436
1436
ty_str { kind_implicitly_sendable( ) | kind_const( ) }
1437
- ty_type { kind_copyable( ) }
1438
1437
ty_fn( f) { proto_kind( f. proto) }
1439
1438
1440
- // Closures have kind determined by capture mode
1441
- ty_opaque_closure_ptr( ck_block) { kind_noncopyable( ) }
1442
- ty_opaque_closure_ptr( ck_box) { kind_implicitly_copyable( ) }
1443
- ty_opaque_closure_ptr( ck_uniq) { kind_sendable( ) }
1444
-
1445
1439
// Those with refcounts raise noncopyable to copyable,
1446
1440
// lower sendable to copyable. Therefore just set result to copyable.
1447
1441
ty_box( tm) {
@@ -1456,7 +1450,7 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
1456
1450
else { kind_implicitly_copyable( ) }
1457
1451
}
1458
1452
}
1459
- ty_iface( _, _) | ty_opaque_box { kind_implicitly_copyable( ) }
1453
+ ty_iface( _, _) { kind_implicitly_copyable( ) }
1460
1454
ty_rptr( _, _) { kind_implicitly_copyable( ) }
1461
1455
1462
1456
// Unique boxes and vecs have the kind of their contained type,
@@ -1548,6 +1542,9 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
1548
1542
ty_self { kind_noncopyable( ) }
1549
1543
1550
1544
ty_var( _) { cx. sess. bug( "Asked to compute kind of a type variable") ; }
1545
+ ty_type | ty_opaque_closure_ptr( _) | ty_opaque_box {
1546
+ cx. sess. bug( "Asked to compute kind of fictitious type ") ;
1547
+ }
1551
1548
} ;
1552
1549
1553
1550
cx. kind_cache. insert( ty, result) ;
0 commit comments