- write!(w, " -> ").unwrap();
- if let Some(mut remaining_path) = first_seg_self(&*rtype) {
- if remaining_path.next().is_none() {
- write!(w, "{}", this_param).unwrap();
- return;
+ let mut ret_ty = Vec::new();
+ types.write_c_type(&mut ret_ty, &*rtype, generics, true);
+
+ if !ret_ty.is_empty() {
+ write!(w, " -> ").unwrap();
+ if let Some(mut remaining_path) = first_seg_self(&*rtype) {
+ if remaining_path.next().is_none() {
+ write!(w, "{}", this_param).unwrap();
+ return;
+ }