syntax: Make static/super/self/Self keywords + special ident cleanup

This commit is contained in:
Vadim Petrochenkov
2016-04-16 18:05:06 +03:00
parent 546c052d22
commit e2c821d35e
28 changed files with 138 additions and 188 deletions

View File

@@ -148,7 +148,7 @@ impl fold::Folder for PreludeInjector {
let vp = P(codemap::dummy_spanned(ast::ViewPathGlob(prelude_path)));
mod_.items.insert(0, P(ast::Item {
id: ast::DUMMY_NODE_ID,
ident: special_idents::invalid,
ident: special_idents::Invalid,
node: ast::ItemKind::Use(vp),
attrs: vec![ast::Attribute {
span: self.span,
@@ -157,7 +157,9 @@ impl fold::Folder for PreludeInjector {
style: ast::AttrStyle::Outer,
value: P(ast::MetaItem {
span: self.span,
node: ast::MetaItemKind::Word(special_idents::prelude_import.name.as_str()),
node: ast::MetaItemKind::Word(
token::intern_and_get_ident("prelude_import")
),
}),
is_sugared_doc: false,
},