Fix compiling empty fmt! strings
This commit is contained in:
parent
dc4560dc26
commit
df626ea137
2 changed files with 8 additions and 0 deletions
|
|
@ -249,6 +249,11 @@ fn pieces_to_expr(cx: @ExtCtxt, sp: span,
|
|||
}
|
||||
}
|
||||
|
||||
/* Short circuit an easy case up front (won't work otherwise) */
|
||||
if pieces.len() == 0 {
|
||||
return cx.expr_str_uniq(args[0].span, @"");
|
||||
}
|
||||
|
||||
let fmt_sp = args[0].span;
|
||||
let mut n = 0u;
|
||||
let nargs = args.len();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue