Skip to content

Commit 28befac

Browse files
committed
---
yaml --- r: 13182 b: refs/heads/master c: 8f7364b h: refs/heads/master v: v3
1 parent 09af3a0 commit 28befac

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2ab1b5838b5d35e57f2f8bcc90f8b70c03e4d9c8
2+
refs/heads/master: 8f7364b26d22f945f1e013041730caaedc640a80
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/ty.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,14 +1434,8 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
14341434
ty_ptr(_) { kind_implicitly_sendable() | kind_const() }
14351435
// FIXME: this *shouldn't* be implicitly copyable (#2450)
14361436
ty_str { kind_implicitly_sendable() | kind_const() }
1437-
ty_type { kind_copyable() }
14381437
ty_fn(f) { proto_kind(f.proto) }
14391438

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-
14451439
// Those with refcounts raise noncopyable to copyable,
14461440
// lower sendable to copyable. Therefore just set result to copyable.
14471441
ty_box(tm) {
@@ -1456,7 +1450,7 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
14561450
else { kind_implicitly_copyable() }
14571451
}
14581452
}
1459-
ty_iface(_, _) | ty_opaque_box { kind_implicitly_copyable() }
1453+
ty_iface(_, _) { kind_implicitly_copyable() }
14601454
ty_rptr(_, _) { kind_implicitly_copyable() }
14611455

14621456
// Unique boxes and vecs have the kind of their contained type,
@@ -1548,6 +1542,9 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
15481542
ty_self { kind_noncopyable() }
15491543

15501544
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+
}
15511548
};
15521549

15531550
cx.kind_cache.insert(ty, result);

0 commit comments

Comments
 (0)