Skip to content

Commit 0989260

Browse files
committed
Use short_ty_string
1 parent 86e3a92 commit 0989260

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
18751875
StringPart::normal(" implemented for `"),
18761876
]);
18771877
if types_content.0 == types_content.1 {
1878-
msg.push(StringPart::normal(obligation_trait_ref.self_ty().to_string()));
1878+
let ty =
1879+
self.tcx.short_ty_string(obligation_trait_ref.self_ty(), &mut None);
1880+
msg.push(StringPart::normal(ty));
18791881
} else {
18801882
msg.extend(types.0.0);
18811883
}

0 commit comments

Comments
 (0)