diff options
| -rw-r--r-- | src/librustc/hir/lowering.rs | 2 | ||||
| -rw-r--r-- | src/librustc/hir/map/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc/hir/mod.rs | 4 | ||||
| -rw-r--r-- | src/librustc/ich/impls_hir.rs | 4 | ||||
| -rw-r--r-- | src/librustc/middle/dead.rs | 2 | ||||
| -rw-r--r-- | src/librustc/traits/error_reporting.rs | 2 | ||||
| -rw-r--r-- | src/librustc_typeck/collect.rs | 6 |
7 files changed, 11 insertions, 11 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs index 4bdf6e1e96b..c6f2f71460e 100644 --- a/src/librustc/hir/lowering.rs +++ b/src/librustc/hir/lowering.rs @@ -1507,7 +1507,7 @@ impl<'a> LoweringContext<'a> { fn lower_variant(&mut self, v: &Variant) -> hir::Variant { Spanned { - node: hir::Variant_ { + node: hir::VariantKind { name: v.node.ident.name, attrs: self.lower_attrs(&v.node.attrs), data: self.lower_variant_data(&v.node.data), diff --git a/src/librustc/hir/map/mod.rs b/src/librustc/hir/map/mod.rs index 08a130f049b..6298c388253 100644 --- a/src/librustc/hir/map/mod.rs +++ b/src/librustc/hir/map/mod.rs @@ -1176,7 +1176,7 @@ impl<T:Named> Named for Spanned<T> { fn name(&self) -> Name { self.node.name() } impl Named for Item { fn name(&self) -> Name { self.name } } impl Named for ForeignItem { fn name(&self) -> Name { self.name } } -impl Named for Variant_ { fn name(&self) -> Name { self.name } } +impl Named for VariantKind { fn name(&self) -> Name { self.name } } impl Named for StructField { fn name(&self) -> Name { self.ident.name } } impl Named for TraitItem { fn name(&self) -> Name { self.ident.name } } impl Named for ImplItem { fn name(&self) -> Name { self.ident.name } } diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 6e413416100..5ae0c3250ff 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -1878,7 +1878,7 @@ pub struct EnumDef { } #[derive(Clone, RustcEncodable, RustcDecodable, Debug)] -pub struct Variant_ { +pub struct VariantKind { pub name: Name, pub attrs: HirVec<Attribute>, pub data: VariantData, @@ -1886,7 +1886,7 @@ pub struct Variant_ { pub disr_expr: Option<AnonConst>, } -pub type Variant = Spanned<Variant_>; +pub type Variant = Spanned<VariantKind>; #[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable, Debug)] pub enum UseKind { diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc/ich/impls_hir.rs index c242efeb8b0..5fbe570a15f 100644 --- a/src/librustc/ich/impls_hir.rs +++ b/src/librustc/ich/impls_hir.rs @@ -793,14 +793,14 @@ impl_stable_hash_for!(struct hir::EnumDef { variants }); -impl_stable_hash_for!(struct hir::Variant_ { +impl_stable_hash_for!(struct hir::VariantKind { name, attrs, data, disr_expr }); -impl_stable_hash_for_spanned!(hir::Variant_); +impl_stable_hash_for_spanned!(hir::VariantKind); impl_stable_hash_for!(enum hir::UseKind { Single, diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs index 180469a5d84..bb6fa72fbe7 100644 --- a/src/librustc/middle/dead.rs +++ b/src/librustc/middle/dead.rs @@ -475,7 +475,7 @@ impl<'a, 'tcx> DeadVisitor<'a, 'tcx> { && !has_allow_dead_code_or_lang_attr(self.tcx, field.id, &field.attrs) } - fn should_warn_about_variant(&mut self, variant: &hir::Variant_) -> bool { + fn should_warn_about_variant(&mut self, variant: &hir::VariantKind) -> bool { !self.symbol_is_live(variant.data.id(), None) && !has_allow_dead_code_or_lang_attr(self.tcx, variant.data.id(), diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs index a5caacea986..194182ab496 100644 --- a/src/librustc/traits/error_reporting.rs +++ b/src/librustc/traits/error_reporting.rs @@ -981,7 +981,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { } hir::map::NodeVariant(&hir::Variant { span, - node: hir::Variant_ { + node: hir::VariantKind { data: hir::VariantData::Tuple(ref fields, _), .. }, diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 5fa98e3ebe6..21102533f8b 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -1090,7 +1090,7 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, } NodeStructCtor(&ref def) | - NodeVariant(&Spanned { node: hir::Variant_ { data: ref def, .. }, .. }) => { + NodeVariant(&Spanned { node: hir::VariantKind { data: ref def, .. }, .. }) => { match *def { VariantData::Unit(..) | VariantData::Struct(..) => { tcx.type_of(tcx.hir.get_parent_did(node_id)) @@ -1123,7 +1123,7 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, NodeExpr(&hir::Expr { node: ExprRepeat(_, ref constant), .. }) if constant.id == node_id => tcx.types.usize, - NodeVariant(&Spanned { node: Variant_ { disr_expr: Some(ref e), .. }, .. }) + NodeVariant(&Spanned { node: VariantKind { disr_expr: Some(ref e), .. }, .. }) if e.id == node_id => { tcx.adt_def(tcx.hir.get_parent_did(node_id)) .repr.discr_type().to_ty(tcx) @@ -1175,7 +1175,7 @@ fn fn_sig<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, } NodeStructCtor(&VariantData::Tuple(ref fields, _)) | - NodeVariant(&Spanned { node: hir::Variant_ { + NodeVariant(&Spanned { node: hir::VariantKind { data: VariantData::Tuple(ref fields, _), .. }, .. }) => { let ty = tcx.type_of(tcx.hir.get_parent_did(node_id)); |
