diff --git a/src/items.rs b/src/items.rs index e196d1817f3..90e9e58ef9c 100644 --- a/src/items.rs +++ b/src/items.rs @@ -739,8 +739,8 @@ fn visit_impl_items(&mut self, items: &[ptr::P]) { (_, Const(..)) => Ordering::Greater, (MacCall(..), _) => Ordering::Less, (_, MacCall(..)) => Ordering::Greater, - (Delegation(..), _) => Ordering::Less, - (_, Delegation(..)) => Ordering::Greater, + (Delegation(..), _) | (DelegationMac(..), _) => Ordering::Less, + (_, Delegation(..)) | (_, DelegationMac(..)) => Ordering::Greater, }); let mut prev_kind = None; for (buf, item) in buffer { diff --git a/src/visitor.rs b/src/visitor.rs index 6209b37004b..e1c7dc35087 100644 --- a/src/visitor.rs +++ b/src/visitor.rs @@ -586,7 +586,7 @@ pub(crate) fn visit_item(&mut self, item: &ast::Item) { ); self.push_rewrite(item.span, rewrite); } - ast::ItemKind::Delegation(..) => { + ast::ItemKind::Delegation(..) | ast::ItemKind::DelegationMac(..) => { // TODO: rewrite delegation items once syntax is established. // For now, leave the contents of the Span unformatted. self.push_rewrite(item.span, None)