File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -965,10 +965,7 @@ fn fmt_type(
965965 write ! ( f, "]" )
966966 }
967967 clean:: RawPointer ( m, t) => {
968- let m = match m {
969- hir:: Mutability :: Mut => "mut" ,
970- hir:: Mutability :: Not => "const" ,
971- } ;
968+ let m = m. ptr_str ( ) ;
972969
973970 if matches ! ( * * t, clean:: Generic ( _) ) || t. is_assoc_ty ( ) {
974971 let ty = t. print ( cx) ;
@@ -1406,12 +1403,13 @@ impl clean::FnDecl {
14061403 }
14071404
14081405 fn print_output ( & self , cx : & Context < ' _ > ) -> impl Display {
1409- fmt:: from_fn ( move |f| match & self . output {
1410- clean:: Tuple ( tys) if tys. is_empty ( ) => Ok ( ( ) ) ,
1411- ty if f. alternate ( ) => {
1412- write ! ( f, " -> {:#}" , ty. print( cx) )
1406+ fmt:: from_fn ( move |f| {
1407+ if self . output . is_unit ( ) {
1408+ return Ok ( ( ) ) ;
14131409 }
1414- ty => write ! ( f, " -> {}" , ty. print( cx) ) ,
1410+
1411+ f. write_str ( if f. alternate ( ) { " -> " } else { " -> " } ) ?;
1412+ self . output . print ( cx) . fmt ( f)
14151413 } )
14161414 }
14171415}
You can’t perform that action at this time.
0 commit comments