1
Fork 0

Separate out a hir::Impl struct

This makes it possible to pass the `Impl` directly to functions, instead
of having to pass each of the many fields one at a time. It also
simplifies matches in many cases.
This commit is contained in:
Joshua Nelson 2020-11-22 17:46:21 -05:00
parent fd34606ddf
commit a8ff647deb
61 changed files with 258 additions and 246 deletions

View file

@ -684,7 +684,7 @@ impl<'a> State<'a> {
self.head(visibility_qualified(&item.vis, "union"));
self.print_struct(struct_def, generics, item.ident.name, item.span, true);
}
hir::ItemKind::Impl {
hir::ItemKind::Impl(hir::Impl {
unsafety,
polarity,
defaultness,
@ -694,7 +694,7 @@ impl<'a> State<'a> {
ref of_trait,
ref self_ty,
items,
} => {
}) => {
self.head("");
self.print_visibility(&item.vis);
self.print_defaultness(defaultness);