Fixed compiler warnings about unnecessary string allocations in debuginfo.rs

This commit is contained in:
Michael Woerister 2013-06-18 11:25:54 +02:00
parent 5d5311dc74
commit f1bd3e7ca2

View file

@ -268,7 +268,7 @@ fn create_basic_type(cx: @mut CrateContext, t: ty::t, _span: span) -> DIType {
ast::ty_f32 => (~"f32", DW_ATE_float),
ast::ty_f64 => (~"f64", DW_ATE_float)
},
_ => cx.sess.bug(~"debuginfo::create_basic_type - t is invalid type")
_ => cx.sess.bug("debuginfo::create_basic_type - t is invalid type")
};
let (size, align) = size_and_align_of(cx, t);
@ -598,7 +598,7 @@ fn create_ty(cx: @mut CrateContext, t: ty::t, span: span) -> DIType {
ty::ty_tup(ref elements) => {
create_tuple(cx, t, *elements, span)
},
_ => cx.sess.bug(~"debuginfo: unexpected type in create_ty")
_ => cx.sess.bug("debuginfo: unexpected type in create_ty")
};
dbg_cx(cx).created_types.insert(ty_id, ty_md);