diff options
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 31fe23847d9..e4460ca865b 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -590,7 +590,12 @@ impl CodeMap { Some(ref info) => { // save the parent expn_id for next loop iteration expnid = info.call_site.expn_id; - if info.callee.span.is_none() { + if info.callee.name == "format_args" { + // This is a hack because the format_args builtin calls unstable APIs. + // I spent like 6 hours trying to solve this more generally but am stupid. + is_internal = true; + false + } else if info.callee.span.is_none() { // it's a compiler built-in, we *really* don't want to mess with it // so we skip it, unless it was called by a regular macro, in which case // we will handle the caller macro next turn |
