Support istrs in #fmt. Issue #855

The format string may be an istr and istr args may be used with %S
This commit is contained in:
Brian Anderson 2011-08-25 21:49:06 -07:00
parent 6b3f0b21be
commit 7284f820d5
3 changed files with 16 additions and 1 deletions

View file

@ -241,6 +241,7 @@ fn pieces_to_expr(cx: &ext_ctxt, sp: span, pieces: &[piece],
}
alt cnv.ty {
ty_str. { ret make_conv_call(cx, arg.span, "str", cnv, arg); }
ty_istr. { ret make_conv_call(cx, arg.span, "istr", cnv, arg); }
ty_int(sign) {
alt sign {
signed. { ret make_conv_call(cx, arg.span, "int", cnv, arg); }
@ -297,6 +298,7 @@ fn pieces_to_expr(cx: &ext_ctxt, sp: span, pieces: &[piece],
alt c.ty {
ty_bool. { log "type: bool"; }
ty_str. { log "type: str"; }
ty_istr. { log "type: istr"; }
ty_char. { log "type: char"; }
ty_int(s) {
alt s {