Refactor how global paths are represented (for both ast and hir).

This commit is contained in:
Jeffrey Seyfried
2016-12-05 03:51:11 +00:00
parent 164619a8cf
commit f10f50b426
27 changed files with 242 additions and 257 deletions

View File

@@ -80,8 +80,7 @@ pub fn maybe_inject_crates_ref(sess: &ParseSess,
}],
vis: ast::Visibility::Inherited,
node: ast::ItemKind::Use(P(codemap::dummy_spanned(ast::ViewPathGlob(ast::Path {
global: false,
segments: vec![name, "prelude", "v1"].into_iter().map(|name| {
segments: ["{{root}}", name, "prelude", "v1"].into_iter().map(|name| {
ast::Ident::from_str(name).into()
}).collect(),
span: span,