1
Fork 0

Move macro resolution into librustc_resolve.

This commit is contained in:
Jeffrey Seyfried 2016-09-07 23:21:59 +00:00
parent 20b43b2323
commit 72a636975f
11 changed files with 438 additions and 405 deletions

View file

@ -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,