1
Fork 0

Give spans to individual path segments in AST

This commit is contained in:
Vadim Petrochenkov 2017-03-08 20:30:06 +03:00 committed by Alex Crichton
parent f573db4f80
commit 32575a0487
10 changed files with 60 additions and 41 deletions

View file

@ -82,7 +82,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 {
segments: ["{{root}}", name, "prelude", "v1"].into_iter().map(|name| {
ast::Ident::from_str(name).into()
ast::PathSegment::from_ident(ast::Ident::from_str(name), DUMMY_SP)
}).collect(),
span: span,
})))),