Skip to content

Commit a5225cb

Browse files
committed
Fix rebase 2
1 parent 40aa09e commit a5225cb

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/librustc/middle/astencode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ fn copy_item_types(dcx: &DecodeContext, ii: &InlinedItem, orig_did: DefId) {
13151315
def.variants.iter().zip(orig_def.variants.iter())
13161316
{
13171317
debug!("astencode: copying variant {:?} => {:?}",
1318-
orig_variant.did, i_variant.node.id);
1318+
orig_variant.did, i_variant.node.data.id);
13191319
copy_item_type(dcx, i_variant.node.data.id, orig_variant.did);
13201320
}
13211321
}
@@ -1324,8 +1324,8 @@ fn copy_item_types(dcx: &DecodeContext, ii: &InlinedItem, orig_did: DefId) {
13241324
let ctor_did = dcx.tcx.lookup_adt_def(orig_did)
13251325
.struct_variant().did;
13261326
debug!("astencode: copying ctor {:?} => {:?}", ctor_did,
1327-
ctor_id);
1328-
copy_item_type(dcx, ctor_id, ctor_did);
1327+
def.id);
1328+
copy_item_type(dcx, def.id, ctor_did);
13291329
}
13301330
}
13311331
_ => {}

src/librustc_front/lowering.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pub fn lower_variant(_lctx: &LoweringContext, v: &Variant) -> P<hir::Variant> {
267267
name: v.node.name.name,
268268
attrs: v.node.attrs.clone(),
269269
data: lower_struct_def(_lctx, &v.node.data),
270-
disr_expr: v.node.disr_expr.as_ref().map(|e| lower_expr(e)),
270+
disr_expr: v.node.disr_expr.as_ref().map(|e| lower_expr(_lctx, e)),
271271
},
272272
span: v.span,
273273
})
@@ -498,15 +498,17 @@ pub fn lower_where_predicate(_lctx: &LoweringContext,
498498
}
499499
}
500500

501-
pub fn lower_struct_def(sd: &VariantData) -> P<hir::VariantData> {
501+
pub fn lower_struct_def(_lctx: &LoweringContext, sd: &VariantData) -> P<hir::VariantData> {
502502
P(hir::VariantData {
503503
id: sd.id,
504504
data_: match sd.data_ {
505505
VariantData_::Struct(ref fields) => {
506-
hir::VariantData_::Struct(fields.iter().map(|f| lower_struct_field(_lctx, f)).collect())
506+
hir::VariantData_::Struct(fields.iter()
507+
.map(|f| lower_struct_field(_lctx, f)).collect())
507508
}
508509
VariantData_::Tuple(ref fields) => {
509-
hir::VariantData_::Tuple(fields.iter().map(|f| lower_struct_field(_lctx, f)).collect())
510+
hir::VariantData_::Tuple(fields.iter()
511+
.map(|f| lower_struct_field(_lctx, f)).collect())
510512
}
511513
VariantData_::Unit => hir::VariantData_::Unit
512514
}

src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ fn convert_enum_def<'tcx>(tcx: &ty::ctxt<'tcx>,
12111211
{
12121212
let did = tcx.map.local_def_id(v.node.data.id);
12131213
let name = v.node.name;
1214-
convert_struct_variant(tcx, did, name, disr, &v.node.data, did)
1214+
convert_struct_variant(tcx, did, name, disr, &v.node.data)
12151215
}
12161216
let did = tcx.map.local_def_id(it.id);
12171217
let repr_hints = tcx.lookup_repr_hints(did);

0 commit comments

Comments
 (0)