fixing struct type display
This commit is contained in:
parent
006bc80f12
commit
1f5846afaa
|
@ -392,13 +392,18 @@ mod ty {
|
||||||
let record = &self.tys.structs[idx as usize];
|
let record = &self.tys.structs[idx as usize];
|
||||||
if ident::is_null(record.name) {
|
if ident::is_null(record.name) {
|
||||||
write!(f, "[{idx}]{{")?;
|
write!(f, "[{idx}]{{")?;
|
||||||
for (i, &super::Field { ref name, ty }) in
|
for (i, &super::Field { name, ty }) in
|
||||||
self.tys.struct_fields(idx).iter().enumerate()
|
self.tys.struct_fields(idx).iter().enumerate()
|
||||||
{
|
{
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
write!(f, ", ")?;
|
write!(f, ", ")?;
|
||||||
}
|
}
|
||||||
write!(f, "{name}: {}", self.rety(ty))?;
|
write!(
|
||||||
|
f,
|
||||||
|
"{}: {}",
|
||||||
|
self.tys.field_names.ident_str(name),
|
||||||
|
self.rety(ty)
|
||||||
|
)?;
|
||||||
}
|
}
|
||||||
write!(f, "}}")
|
write!(f, "}}")
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue