@@ -827,8 +827,9 @@ impl Rewrite for ast::Ty {
827827
828828 rewrite_unary_prefix ( context, prefix, & * mt. ty , shape)
829829 }
830- ast:: TyKind :: Ref ( ref lifetime, _pinned, ref mt) => {
831- // FIXME: format pinnedness
830+ ast:: TyKind :: Ref ( ref lifetime, ref mt)
831+ | ast:: TyKind :: PinnedRef ( ref lifetime, ref mt) => {
832+ // FIXME(pin_ergonomics): correctly format pinned reference syntax
832833 let mut_str = format_mutability ( mt. mutbl ) ;
833834 let mut_len = mut_str. len ( ) ;
834835 let mut result = String :: with_capacity ( 128 ) ;
@@ -1263,9 +1264,9 @@ pub(crate) fn can_be_overflowed_type(
12631264) -> bool {
12641265 match ty. kind {
12651266 ast:: TyKind :: Tup ( ..) => context. use_block_indent ( ) && len == 1 ,
1266- ast:: TyKind :: Ref ( _, _ , ref mutty) | ast :: TyKind :: Ptr ( ref mutty ) => {
1267- can_be_overflowed_type ( context , & * mutty . ty , len )
1268- }
1267+ ast:: TyKind :: Ref ( _, ref mutty)
1268+ | ast :: TyKind :: PinnedRef ( _ , ref mutty )
1269+ | ast :: TyKind :: Ptr ( ref mutty ) => can_be_overflowed_type ( context , & * mutty . ty , len ) ,
12691270 _ => false ,
12701271 }
12711272}
0 commit comments