Skip to content

Commit 04b32ce

Browse files
committed
save-analysis: merge StructRef and TypeRef
1 parent 78c25ea commit 04b32ce

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/librustc_trans/save/dump_csv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
249249
match def {
250250
def::DefMod(_) |
251251
def::DefForeignMod(_) => Some(recorder::ModRef),
252-
def::DefStruct(_) => Some(recorder::StructRef),
252+
def::DefStruct(_) => Some(recorder::TypeRef),
253253
def::DefTy(..) |
254254
def::DefAssociatedTy(..) |
255255
def::DefTrait(_) => Some(recorder::TypeRef),
@@ -785,7 +785,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
785785
sub_span,
786786
def.def_id(),
787787
self.cur_scope),
788-
def::DefStruct(def_id) => self.fmt.ref_str(recorder::StructRef,
788+
def::DefStruct(def_id) => self.fmt.ref_str(recorder::TypeRef,
789789
span,
790790
sub_span,
791791
def_id,
@@ -886,7 +886,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
886886
let struct_def = match *ty {
887887
ty::TyStruct(def_id, _) => {
888888
let sub_span = self.span.span_for_last_ident(path.span);
889-
self.fmt.ref_str(recorder::StructRef,
889+
self.fmt.ref_str(recorder::TypeRef,
890890
path.span,
891891
sub_span,
892892
def_id,
@@ -918,7 +918,7 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
918918
None => {}
919919
}
920920

921-
self.visit_expr(&*field.expr)
921+
self.visit_expr(&field.expr)
922922
}
923923
visit::walk_expr_opt(self, base)
924924
}

src/librustc_trans/save/recorder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pub enum Row {
8989
ModRef,
9090
VarRef,
9191
TypeRef,
92-
StructRef,
9392
FnRef,
9493
}
9594

@@ -150,9 +149,6 @@ impl<'a> FmtStrs<'a> {
150149
TypeRef => ("type_ref",
151150
vec!("refid","refidcrate","qualname","scopeid"),
152151
true, true),
153-
StructRef => ("struct_ref",
154-
vec!("refid","refidcrate","qualname","scopeid"),
155-
true, true),
156152
FnRef => ("fn_ref", vec!("refid","refidcrate","qualname","scopeid"), true, true)
157153
}
158154
}

0 commit comments

Comments
 (0)