Optimize ast::PathSegment
.
This commit is contained in:
parent
dcae8bfb40
commit
8e61ff25d8
14 changed files with 86 additions and 210 deletions
|
@ -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,
|
||||
})))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue