Remove more duplicated spans

This commit is contained in:
Vadim Petrochenkov
2018-03-19 03:54:56 +03:00
parent 62000c072e
commit b3b5ef186c
33 changed files with 181 additions and 200 deletions

View File

@@ -70,7 +70,7 @@ pub fn maybe_inject_crates_ref(mut krate: ast::Crate, alt_std_name: Option<&str>
krate.module.items.insert(0, P(ast::Item {
attrs: vec![ast::Attribute {
style: ast::AttrStyle::Outer,
path: ast::Path::from_ident(span, ast::Ident::from_str("prelude_import")),
path: ast::Path::from_ident(ast::Ident::new(Symbol::intern("prelude_import"), span)),
tokens: TokenStream::empty(),
id: attr::mk_attr_id(),
is_sugared_doc: false,
@@ -80,7 +80,7 @@ pub fn maybe_inject_crates_ref(mut krate: ast::Crate, alt_std_name: Option<&str>
node: ast::ItemKind::Use(P(ast::UseTree {
prefix: ast::Path {
segments: [name, "prelude", "v1"].into_iter().map(|name| {
ast::PathSegment::from_ident(ast::Ident::from_str(name), DUMMY_SP)
ast::PathSegment::from_ident(ast::Ident::from_str(name))
}).collect(),
span,
},