Add test cases for resources

This commit is contained in:
Marijn Haverbeke 2011-06-28 17:47:56 +02:00
parent 07125aa38b
commit fb14afd5eb
3 changed files with 25 additions and 1 deletions

View file

@ -3137,7 +3137,7 @@ fn copy_val(&@block_ctxt cx, copy_action action, ValueRef dst, ValueRef src,
// FIXME this is just a clunky stopgap. we should do proper checking in an
// earlier pass.
if (!ty::type_is_copyable(ccx.tcx, t)) {
ccx.sess.span_err(cx.sp, "Copying a non-copyable type.");
ccx.sess.span_fatal(cx.sp, "Copying a non-copyable type.");
}
if (ty::type_is_scalar(ccx.tcx, t) ||