|
11 | 11 | // The Rust abstract syntax tree.
|
12 | 12 |
|
13 | 13 | pub use self::Pat_::*;
|
14 |
| -pub use self::PathListItem_::*; |
15 | 14 | pub use self::StructFieldKind::*;
|
16 | 15 | pub use self::TyParamBound::*;
|
17 | 16 | pub use self::UnsafeSource::*;
|
@@ -1737,42 +1736,42 @@ pub struct Variant_ {
|
1737 | 1736 | pub type Variant = Spanned<Variant_>;
|
1738 | 1737 |
|
1739 | 1738 | #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)]
|
1740 |
| -pub enum PathListItem_ { |
1741 |
| - PathListIdent { |
| 1739 | +pub enum PathListItemKind { |
| 1740 | + Ident { |
1742 | 1741 | name: Ident,
|
1743 | 1742 | /// renamed in list, eg `use foo::{bar as baz};`
|
1744 | 1743 | rename: Option<Ident>,
|
1745 | 1744 | id: NodeId
|
1746 | 1745 | },
|
1747 |
| - PathListMod { |
| 1746 | + Mod { |
1748 | 1747 | /// renamed in list, eg `use foo::{self as baz};`
|
1749 | 1748 | rename: Option<Ident>,
|
1750 | 1749 | id: NodeId
|
1751 | 1750 | }
|
1752 | 1751 | }
|
1753 | 1752 |
|
1754 |
| -impl PathListItem_ { |
| 1753 | +impl PathListItemKind { |
1755 | 1754 | pub fn id(&self) -> NodeId {
|
1756 | 1755 | match *self {
|
1757 |
| - PathListIdent { id, .. } | PathListMod { id, .. } => id |
| 1756 | + PathListItemKind::Ident { id, .. } | PathListItemKind::Mod { id, .. } => id |
1758 | 1757 | }
|
1759 | 1758 | }
|
1760 | 1759 |
|
1761 | 1760 | pub fn name(&self) -> Option<Ident> {
|
1762 | 1761 | match *self {
|
1763 |
| - PathListIdent { name, .. } => Some(name), |
1764 |
| - PathListMod { .. } => None, |
| 1762 | + PathListItemKind::Ident { name, .. } => Some(name), |
| 1763 | + PathListItemKind::Mod { .. } => None, |
1765 | 1764 | }
|
1766 | 1765 | }
|
1767 | 1766 |
|
1768 | 1767 | pub fn rename(&self) -> Option<Ident> {
|
1769 | 1768 | match *self {
|
1770 |
| - PathListIdent { rename, .. } | PathListMod { rename, .. } => rename |
| 1769 | + PathListItemKind::Ident { rename, .. } | PathListItemKind::Mod { rename, .. } => rename |
1771 | 1770 | }
|
1772 | 1771 | }
|
1773 | 1772 | }
|
1774 | 1773 |
|
1775 |
| -pub type PathListItem = Spanned<PathListItem_>; |
| 1774 | +pub type PathListItem = Spanned<PathListItemKind>; |
1776 | 1775 |
|
1777 | 1776 | pub type ViewPath = Spanned<ViewPath_>;
|
1778 | 1777 |
|
|
0 commit comments