diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs index dd2f0ec2096..cc56c679031 100644 --- a/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs +++ b/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs @@ -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); }