1
Fork 0

Optimize ast::PathSegment.

This commit is contained in:
Jeffrey Seyfried 2016-12-10 06:45:58 +00:00
parent dcae8bfb40
commit 8e61ff25d8
14 changed files with 86 additions and 210 deletions

View file

@ -81,9 +81,8 @@ 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| ast::PathSegment {
identifier: ast::Ident::from_str(name),
parameters: ast::PathParameters::none(),
segments: vec![name, "prelude", "v1"].into_iter().map(|name| {
ast::Ident::from_str(name).into()
}).collect(),
span: span,
})))),