Revert "Fix ast expanded printing for anonymous types"
This reverts commit 5b4bc05fa5
.
This commit is contained in:
parent
2041fb1a2d
commit
5560f6d90a
1 changed files with 10 additions and 6 deletions
|
@ -986,12 +986,12 @@ impl<'a> State<'a> {
|
|||
self.pclose();
|
||||
}
|
||||
ast::TyKind::AnonymousStruct(ref fields, ..) => {
|
||||
self.head("struct");
|
||||
self.print_record_struct_body(&fields, ty.span);
|
||||
self.s.word("struct");
|
||||
self.print_record_struct_body(fields, ty.span);
|
||||
}
|
||||
ast::TyKind::AnonymousUnion(ref fields, ..) => {
|
||||
self.head("union");
|
||||
self.print_record_struct_body(&fields, ty.span);
|
||||
self.s.word("union");
|
||||
self.print_record_struct_body(fields, ty.span);
|
||||
}
|
||||
ast::TyKind::Paren(ref typ) => {
|
||||
self.popen();
|
||||
|
@ -1413,7 +1413,12 @@ impl<'a> State<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
crate fn print_record_struct_body(&mut self, fields: &[ast::FieldDef], span: rustc_span::Span) {
|
||||
crate fn print_record_struct_body(
|
||||
&mut self,
|
||||
fields: &Vec<ast::FieldDef>,
|
||||
span: rustc_span::Span,
|
||||
) {
|
||||
self.nbsp();
|
||||
self.bopen();
|
||||
self.hardbreak_if_not_bol();
|
||||
|
||||
|
@ -1462,7 +1467,6 @@ impl<'a> State<'a> {
|
|||
}
|
||||
ast::VariantData::Struct(ref fields, ..) => {
|
||||
self.print_where_clause(&generics.where_clause);
|
||||
self.nbsp();
|
||||
self.print_record_struct_body(fields, span);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue