diff options
Diffstat (limited to 'src/librustdoc/json')
-rw-r--r-- | src/librustdoc/json/conversions.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 935bb721f..91cd55b11 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -624,10 +624,7 @@ impl FromWithTcx<clean::FnDecl> for FnDecl { .into_iter() .map(|arg| (arg.name.to_string(), arg.type_.into_tcx(tcx))) .collect(), - output: match output { - clean::FnRetTy::Return(t) => Some(t.into_tcx(tcx)), - clean::FnRetTy::DefaultReturn => None, - }, + output: if output.is_unit() { None } else { Some(output.into_tcx(tcx)) }, c_variadic, } } |