Use short_ty_string

This commit is contained in:
Esteban Küber 2024-10-25 02:41:55 +00:00
parent c6017badb4
commit 86b5965608

View File

@ -1872,7 +1872,9 @@ pub(super) fn report_similar_impl_candidates(
StringPart::normal(" implemented for `"),
]);
if types_content.0 == types_content.1 {
msg.push(StringPart::normal(obligation_trait_ref.self_ty().to_string()));
let ty =
self.tcx.short_ty_string(obligation_trait_ref.self_ty(), &mut None);
msg.push(StringPart::normal(ty));
} else {
msg.extend(types.0.0);
}