Skip to content

Commit e55b793

Browse files
committed
save-analysis: give the correct fully qualified name for fields in struct variants
1 parent 35a6f62 commit e55b793

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/librustc_trans/save/mod.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
636636
item.id);
637637

638638
for field in struct_def.fields.iter() {
639-
self.process_struct_field_def(field, enum_name[], variant.node.id);
639+
self.process_struct_field_def(field, qualname[], variant.node.id);
640640
self.visit_ty(&*field.node.ty);
641641
}
642642
}
@@ -1422,8 +1422,7 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DxrVisitor<'l, 'tcx> {
14221422
let def_map = self.analysis.ty_cx.def_map.borrow();
14231423
if !def_map.contains_key(&id) {
14241424
self.sess.span_bug(p.span,
1425-
format!("def_map has no key for {} in visit_arm",
1426-
id)[]);
1425+
format!("def_map has no key for {} in visit_arm", id)[]);
14271426
}
14281427
let def = &(*def_map)[id];
14291428
match *def {
@@ -1433,16 +1432,15 @@ impl<'l, 'tcx, 'v> Visitor<'v> for DxrVisitor<'l, 'tcx> {
14331432
path_to_string(p)[],
14341433
value[],
14351434
""),
1436-
def::DefVariant(_,id,_) => self.fmt.ref_str(ref_kind,
1437-
p.span,
1438-
sub_span,
1439-
id,
1440-
self.cur_scope),
1435+
def::DefVariant(_, id ,_) => self.fmt.ref_str(ref_kind,
1436+
p.span,
1437+
sub_span,
1438+
id,
1439+
self.cur_scope),
14411440
// FIXME(nrc) what is this doing here?
14421441
def::DefStatic(_, _) => {}
14431442
def::DefConst(..) => {}
1444-
_ => error!("unexpected definition kind when processing collected paths: {}",
1445-
*def)
1443+
_ => error!("unexpected definition kind when processing collected paths: {}", *def)
14461444
}
14471445
}
14481446
self.collected_paths.clear();

0 commit comments

Comments
 (0)