@@ -665,11 +665,11 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
665665 }
666666
667667 // TODO(calebcartwright): consider enabling box_patterns feature gate
668- match ( & ai. kind , visitor_kind ) {
669- ( ast:: AssocItemKind :: Const ( c) , AssocTraitItem ) => {
668+ match ( & ai. kind , assoc_ctxt ) {
669+ ( ast:: AssocItemKind :: Const ( c) , visit :: AssocCtxt :: Trait ) => {
670670 self . visit_static ( & StaticParts :: from_trait_item ( ai, c. ident ) )
671671 }
672- ( ast:: AssocItemKind :: Const ( c) , AssocImplItem ) => {
672+ ( ast:: AssocItemKind :: Const ( c) , visit :: AssocCtxt :: Impl { .. } ) => {
673673 self . visit_static ( & StaticParts :: from_impl_item ( ai, c. ident ) )
674674 }
675675 ( ast:: AssocItemKind :: Fn ( ref fn_kind) , _) => {
@@ -714,7 +714,11 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
714714 ( ast:: AssocItemKind :: MacCall ( ref mac) , _) => {
715715 self . visit_mac ( mac, MacroPosition :: Item ) ;
716716 }
717- _ => unreachable ! ( ) ,
717+ ( ast:: AssocItemKind :: Delegation ( _) | ast:: AssocItemKind :: DelegationMac ( _) , _) => {
718+ // TODO(ytmimi) #![feature(fn_delegation)]
719+ // add formatting for `AssocItemKind::Delegation` and `AssocItemKind::DelegationMac`
720+ self . push_rewrite ( ai. span , None ) ;
721+ }
718722 }
719723 }
720724
0 commit comments