Skip to content

Commit

Permalink
Fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
long-long-float committed Feb 11, 2024
1 parent f6cddd2 commit 061eb97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_infer/src/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2453,11 +2453,11 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
&& suggestion_scope == type_scope
{
let suggestion =
if has_lifetimes { format!("+ {lt_name}") } else { format!(": {lt_name}") };
if has_lifetimes { format!(" + {lt_name}") } else { format!(": {lt_name}") };

if needs_parentheses {
suggs.push((sp.shrink_to_lo(), "(".to_string()));
suggs.push((sp.shrink_to_hi(), format!(") {suggestion}")));
suggs.push((sp.shrink_to_hi(), format!("){suggestion}")));
} else {
suggs.push((sp, suggestion))
}
Expand Down

0 comments on commit 061eb97

Please sign in to comment.