Skip to content

Commit 5c5065e

Browse files
committed
Don't emit strings when the destination is ignored.
1 parent 5821b9e commit 5c5065e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rustc/middle/trans/tvec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ fn get_base_and_len(cx: block, v: ValueRef, e_ty: ty::t)
269269
fn trans_estr(bcx: block, s: @str/~, vstore: ast::vstore,
270270
dest: dest) -> block {
271271
let _icx = bcx.insn_ctxt("tvec::trans_estr");
272+
if dest == base::ignore { ret bcx; }
272273
let ccx = bcx.ccx();
273274

274275
let c = alt vstore {

0 commit comments

Comments
 (0)