mut_visit::{self, MutVisitor},
parse::ParseSess,
ptr::P,
- symbol::{keywords, Symbol, sym}
+ symbol::{kw, sym, Symbol}
};
use syntax_pos::Span;
call_site: item.span, // use the call site of the static
def_site: None,
format: MacroAttribute(Symbol::intern(name)),
- allow_internal_unstable: Some(vec![
- Symbol::intern("rustc_attrs"),
- ].into()),
+ allow_internal_unstable: Some(vec![sym::rustc_attrs].into()),
allow_internal_unsafe: false,
local_inner_macros: false,
edition: self.sess.edition,
// We will generate a new submodule. To `use` the static from that module, we need to get
// the `super::...` path.
- let super_path =
- f.cx.path(f.span, vec![Ident::with_empty_ctxt(keywords::Super.name()), f.global]);
+ let super_path = f.cx.path(f.span, vec![Ident::with_empty_ctxt(kw::Super), f.global]);
// Generate the items in the submodule
let mut items = vec![
}
fn attrs(&self) -> Vec<Attribute> {
- let special = Symbol::intern("rustc_std_internal_symbol");
+ let special = sym::rustc_std_internal_symbol;
let special = self.cx.meta_word(self.span, special);
vec![self.cx.attribute(self.span, special)]
}