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(
965
965
write ! ( f, "]" )
966
966
}
967
967
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 ( ) ;
972
969
973
970
if matches ! ( * * t, clean:: Generic ( _) ) || t. is_assoc_ty ( ) {
974
971
let ty = t. print ( cx) ;
@@ -1406,12 +1403,13 @@ impl clean::FnDecl {
1406
1403
}
1407
1404
1408
1405
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 ( ( ) ) ;
1413
1409
}
1414
- ty => write ! ( f, " -> {}" , ty. print( cx) ) ,
1410
+
1411
+ f. write_str ( if f. alternate ( ) { " -> " } else { " -> " } ) ?;
1412
+ self . output . print ( cx) . fmt ( f)
1415
1413
} )
1416
1414
}
1417
1415
}
You can’t perform that action at this time.
0 commit comments