Use hygiene to access the injected crate (core
or std
) from builtin macros.
This commit is contained in:
parent
8db163e53d
commit
9c7969d3df
20 changed files with 99 additions and 102 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue