1
Fork 0

Point to where missing return type should go

This commit is contained in:
Michael Goulet 2023-09-30 19:29:41 +00:00
parent eea26141ec
commit 137b6d0b01
34 changed files with 86 additions and 71 deletions

View file

@ -1189,7 +1189,7 @@ fn report_trait_method_mismatch<'tcx>(
let ap = Applicability::MachineApplicable;
match sig.decl.output {
hir::FnRetTy::DefaultReturn(sp) => {
let sugg = format!("-> {} ", trait_sig.output());
let sugg = format!(" -> {}", trait_sig.output());
diag.span_suggestion_verbose(sp, msg, sugg, ap);
}
hir::FnRetTy::Return(hir_ty) => {