Skip to content

Commit a442c1e

Browse files
remove Clean trait implementation for hir::FnRetTy
1 parent caee496 commit a442c1e

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/librustdoc/clean/mod.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,11 @@ fn clean_fn_decl_with_args<'tcx>(
956956
decl: &hir::FnDecl<'tcx>,
957957
args: Arguments,
958958
) -> FnDecl {
959-
FnDecl { inputs: args, output: decl.output.clean(cx), c_variadic: decl.c_variadic }
959+
let output = match decl.output {
960+
hir::FnRetTy::Return(typ) => Return(clean_ty(typ, cx)),
961+
hir::FnRetTy::DefaultReturn(..) => DefaultReturn,
962+
};
963+
FnDecl { inputs: args, output, c_variadic: decl.c_variadic }
960964
}
961965

962966
fn clean_fn_decl_from_did_and_sig<'tcx>(
@@ -991,15 +995,6 @@ fn clean_fn_decl_from_did_and_sig<'tcx>(
991995
}
992996
}
993997

994-
impl<'tcx> Clean<'tcx, FnRetTy> for hir::FnRetTy<'tcx> {
995-
fn clean(&self, cx: &mut DocContext<'tcx>) -> FnRetTy {
996-
match *self {
997-
Self::Return(typ) => Return(clean_ty(typ, cx)),
998-
Self::DefaultReturn(..) => DefaultReturn,
999-
}
1000-
}
1001-
}
1002-
1003998
impl<'tcx> Clean<'tcx, Path> for hir::TraitRef<'tcx> {
1004999
fn clean(&self, cx: &mut DocContext<'tcx>) -> Path {
10051000
let path = clean_path(self.path, cx);

0 commit comments

Comments
 (0)