Rename ast::Variant_::name into ident + Fix rebase

This commit is contained in:
Vadim Petrochenkov
2018-03-19 01:21:30 +03:00
parent 43ad972318
commit 62000c072e
21 changed files with 30 additions and 38 deletions

View File

@@ -1866,7 +1866,7 @@ pub struct EnumDef {
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
pub struct Variant_ {
pub name: Ident,
pub ident: Ident,
pub attrs: Vec<Attribute>,
pub data: VariantData,
/// Explicit discriminant, e.g. `Foo = 1`
@@ -1900,7 +1900,7 @@ impl UseTree {
match self.kind {
UseTreeKind::Simple(Some(rename)) => rename,
UseTreeKind::Simple(None) =>
self.prefix.segments.last().expect("empty prefix in a simple import").identifier,
self.prefix.segments.last().expect("empty prefix in a simple import").ident,
_ => panic!("`UseTree::ident` can only be used on a simple import"),
}
}