Use hygiene to access the injected crate (core or std) from builtin macros.

This commit is contained in:
Jeffrey Seyfried 2017-12-06 10:50:55 -08:00
parent 8db163e53d
commit 9c7969d3df
20 changed files with 99 additions and 102 deletions

View file

@ -272,7 +272,7 @@ fn generate_test_harness(sess: &ParseSess,
let mark = Mark::fresh(Mark::root());
let mut cx: TestCtxt = TestCtxt {
let cx = TestCtxt {
span_diagnostic: sd,
ext_cx: ExtCtxt::new(sess, ExpansionConfig::default("test".to_string()), resolver),
path: Vec::new(),
@ -283,7 +283,6 @@ fn generate_test_harness(sess: &ParseSess,
toplevel_reexport: None,
ctxt: SyntaxContext::empty().apply_mark(mark),
};
cx.ext_cx.crate_root = Some("std");
mark.set_expn_info(ExpnInfo {
call_site: DUMMY_SP,