Move macro resolution into librustc_resolve
.
This commit is contained in:
parent
20b43b2323
commit
72a636975f
11 changed files with 438 additions and 405 deletions
|
@ -74,8 +74,8 @@ pub fn expand_stringify(cx: &mut ExtCtxt, sp: Span, tts: &[tokenstream::TokenTre
|
|||
pub fn expand_mod(cx: &mut ExtCtxt, sp: Span, tts: &[tokenstream::TokenTree])
|
||||
-> Box<base::MacResult+'static> {
|
||||
base::check_zero_tts(cx, sp, tts, "module_path!");
|
||||
let paths = cx.syntax_env.paths();
|
||||
let string = paths.mod_path.iter().map(|x| x.to_string()).collect::<Vec<String>>().join("::");
|
||||
let mod_path = &cx.current_expansion.module.mod_path;
|
||||
let string = mod_path.iter().map(|x| x.to_string()).collect::<Vec<String>>().join("::");
|
||||
|
||||
base::MacEager::expr(cx.expr_str(
|
||||
sp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue