save-analysis: Fix ICE when processing associated constant

This commit is contained in:
Igor Matuszewski 2019-05-08 23:45:19 +02:00
parent e6305805a7
commit 58d39a93a0

View File

@ -463,10 +463,12 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
}
// walk type and init value
self.visit_ty(typ);
if let Some(expr) = expr {
self.visit_expr(expr);
}
self.nest_tables(id, |v| {
v.visit_ty(typ);
if let Some(expr) = expr {
v.visit_expr(expr);
}
});
}
// FIXME tuple structs should generate tuple-specific data.