Adjust spacing in suggestion, add a test
This commit is contained in:
parent
30e3673d43
commit
48281b003f
9 changed files with 50 additions and 12 deletions
|
@ -608,13 +608,13 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
// That should be extracted into a helper function.
|
||||
if constraint.ends_with('>') {
|
||||
constraint = format!(
|
||||
"{}, {}={}>",
|
||||
"{}, {} = {}>",
|
||||
&constraint[..constraint.len() - 1],
|
||||
name,
|
||||
term
|
||||
);
|
||||
} else {
|
||||
constraint.push_str(&format!("<{}={}>", name, term));
|
||||
constraint.push_str(&format!("<{} = {}>", name, term));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue