/// Not parsed directly, but created on macro import or `macro_rules!` expansion.
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct MacroDef {
- pub ident: Ident,
+ pub name: Name,
pub attrs: Vec<Attribute>,
pub id: NodeId,
pub span: Span,
- pub imported_from: Option<Ident>,
+ pub imported_from: Option<Name>,
pub export: bool,
pub use_locally: bool,
pub allow_internal_unstable: bool,
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
pub enum PathListItem_ {
PathListIdent {
- name: Ident,
+ name: Name,
/// renamed in list, eg `use foo::{bar as baz};`
- rename: Option<Ident>,
+ rename: Option<Name>,
id: NodeId
},
PathListMod {
/// renamed in list, eg `use foo::{self as baz};`
- rename: Option<Ident>,
+ rename: Option<Name>,
id: NodeId
}
}
}
}
- pub fn rename(&self) -> Option<Ident> {
+ pub fn rename(&self) -> Option<Name> {
match *self {
PathListIdent { rename, .. } | PathListMod { rename, .. } => rename
}
/// or just
///
/// `foo::bar::baz` (with `as baz` implicitly on the right)
- ViewPathSimple(Ident, Path),
+ ViewPathSimple(Name, Path),
/// `foo::bar::*`
ViewPathGlob(Path),