Skip to content

Commit 959e382

Browse files
committed
Revert "DO NOT COMMIT"
This reverts commit 76679c1.
1 parent e30388f commit 959e382

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

src/librustc/middle/trans/glue.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -571,30 +571,9 @@ pub fn decr_refcnt_maybe_free(bcx: block,
571571
}
572572
}
573573

574-
pub fn copy_glue_should_never_be_called(bcx: block, t: ty::t) -> bool {
575-
match ty::get(t).sty {
576-
ty::ty_infer(*)
577-
| ty::ty_type
578-
| ty::ty_opaque_closure_ptr(*)
579-
| ty::ty_opaque_box
580-
| ty::ty_unboxed_vec(*)
581-
| ty::ty_err => {
582-
// Not sure under what scenarios these non-types get take glue
583-
false
584-
}
585-
_ => !ty::type_is_copyable(bcx.tcx(), t)
586-
}
587-
}
588574

589575
pub fn make_take_glue(bcx: block, v: ValueRef, t: ty::t) {
590576
let _icx = bcx.insn_ctxt("make_take_glue");
591-
592-
if copy_glue_should_never_be_called(bcx, t) {
593-
controlflow::trans_fail(bcx, bcx.fcx.span,
594-
~"calling take glue on non-copyable");
595-
return;
596-
}
597-
598577
// NB: v is a *pointer* to type t here, not a direct value.
599578
let bcx = match ty::get(t).sty {
600579
ty::ty_box(_) | ty::ty_opaque_box |

src/librustc/middle/ty.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,8 +2181,7 @@ pub fn type_kind_ext(cx: ctxt, ty: t, allow_ty_var: bool) -> Kind {
21812181
21822182
ty_type | ty_opaque_closure_ptr(_)
21832183
| ty_opaque_box | ty_unboxed_vec(_) | ty_err => {
2184-
kind_copyable()
2185-
//cx.sess.bug(~"Asked to compute kind of fictitious type");
2184+
cx.sess.bug(~"Asked to compute kind of fictitious type");
21862185
}
21872186
};
21882187

0 commit comments

Comments
 (0)