1
Fork 0

Add label to method chains where assoc type remains the same

This commit is contained in:
Esteban Küber 2022-12-07 12:25:49 -08:00
parent c77ad2d765
commit aff0ab43c8
2 changed files with 10 additions and 5 deletions

View file

@ -3027,6 +3027,11 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
span,
format!("`{assoc}` changed to `{ty}` here"),
));
} else {
span_labels.push((
span,
format!("`{assoc}` remains `{ty}` here"),
));
}
}
(Some((span, (assoc, ty))), None) => {