From f1bd3e7ca2c5094c1e197c3276e5759ce0e73b91 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 18 Jun 2013 11:25:54 +0200 Subject: [PATCH] Fixed compiler warnings about unnecessary string allocations in debuginfo.rs --- src/librustc/middle/trans/debuginfo.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index f231af974735..cbac33ebe8b0 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -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);