1
Fork 0

Improve suggestion for calling closure on type mismatch

This commit is contained in:
Michael Goulet 2022-06-19 23:11:31 -07:00
parent dc80ca78b6
commit d15fed79b8
11 changed files with 143 additions and 125 deletions

View file

@ -856,7 +856,7 @@ pub trait PrettyPrinter<'tcx>:
p!(")");
if let Term::Ty(ty) = return_ty.skip_binder() {
if !ty.is_unit() {
p!("-> ", print(return_ty));
p!(" -> ", print(return_ty));
}
}
p!(write("{}", if paren_needed { ")" } else { "" }));