Change syntax extension syntax: #m[...] -> m!{...}.
This commit is contained in:
@@ -243,22 +243,22 @@ fn get_mac_args(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
|
||||
alt max {
|
||||
some(max) if ! (min <= elts_len && elts_len <= max) {
|
||||
cx.span_fatal(sp,
|
||||
#fmt["#%s takes between %u and %u arguments.",
|
||||
name, min, max]);
|
||||
fmt!{"#%s takes between %u and %u arguments.",
|
||||
name, min, max});
|
||||
}
|
||||
none if ! (min <= elts_len) {
|
||||
cx.span_fatal(sp, #fmt["#%s needs at least %u arguments.",
|
||||
name, min]);
|
||||
cx.span_fatal(sp, fmt!{"#%s needs at least %u arguments.",
|
||||
name, min});
|
||||
}
|
||||
_ { ret elts; /* we're good */}
|
||||
}
|
||||
}
|
||||
_ {
|
||||
cx.span_fatal(sp, #fmt["#%s: malformed invocation", name])
|
||||
cx.span_fatal(sp, fmt!{"#%s: malformed invocation", name})
|
||||
}
|
||||
}
|
||||
}
|
||||
none {cx.span_fatal(sp, #fmt["#%s: missing arguments", name])}
|
||||
none {cx.span_fatal(sp, fmt!{"#%s: missing arguments", name})}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user