Improve interaction between macros 2.0 and macro_rules!.

This commit is contained in:
Jeffrey Seyfried 2017-11-29 01:05:31 -08:00
parent 3dfbc88a62
commit d052d28d70
8 changed files with 126 additions and 9 deletions

View file

@ -95,7 +95,7 @@ impl FromStr for TokenStream {
// notify the expansion info that it is unhygienic
let mark = Mark::fresh(mark);
mark.set_expn_info(expn_info);
let span = call_site.with_ctxt(call_site.ctxt().apply_mark(mark));
let span = call_site.with_ctxt(SyntaxContext::empty().apply_mark(mark));
let stream = parse::parse_stream_from_source_str(name, src, sess, Some(span));
Ok(__internal::token_stream_wrap(stream))
})