Skip to content

Commit 7ddff8b

Browse files
committed
---
yaml --- r: 15288 b: refs/heads/try c: f65e26e h: refs/heads/master v: v3
1 parent 5262c35 commit 7ddff8b

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 90d3f0fb5e8512a3024a7ece53c8c200e8e12e28
5+
refs/heads/try: f65e26eeee900a0f2f460631ac58086190ce6a4a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/middle/trans/native.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -780,15 +780,17 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::native_item,
780780
"forget" {}
781781
"reinterpret_cast" {
782782
let llout_ty = type_of::type_of(ccx, substs.tys[1]);
783-
if shape::llsize_of_real(ccx, lltp_ty) !=
784-
shape::llsize_of_real(ccx, llout_ty) {
783+
let tp_sz = shape::llsize_of_real(ccx, lltp_ty),
784+
out_sz = shape::llsize_of_real(ccx, llout_ty);
785+
if tp_sz != out_sz {
785786
let sp = alt check ccx.tcx.items.get(option::get(ref_id)) {
786787
ast_map::node_expr(e) { e.span }
787788
};
788-
ccx.sess.span_fatal(sp, "reinterpret_cast called on types \
789-
with different size: " +
790-
ty_to_str(ccx.tcx, tp_ty) + " to " +
791-
ty_to_str(ccx.tcx, substs.tys[1]));
789+
ccx.sess.span_fatal(
790+
sp, #fmt("reinterpret_cast called on types \
791+
with different size: %s (%u) to %s (%u)",
792+
ty_to_str(ccx.tcx, tp_ty), tp_sz,
793+
ty_to_str(ccx.tcx, substs.tys[1]), out_sz));
792794
}
793795
if !ty::type_is_nil(substs.tys[1]) {
794796
let cast = PointerCast(bcx, get_param(decl, first_real_arg),

0 commit comments

Comments
 (0)