Skip to content

Commit 86b5965

Browse files
committed
Use short_ty_string
1 parent c6017ba commit 86b5965

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
@@ -1872,7 +1872,9 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
18721872
StringPart::normal(" implemented for `"),
18731873
]);
18741874
if types_content.0 == types_content.1 {
1875-
msg.push(StringPart::normal(obligation_trait_ref.self_ty().to_string()));
1875+
let ty =
1876+
self.tcx.short_ty_string(obligation_trait_ref.self_ty(), &mut None);
1877+
msg.push(StringPart::normal(ty));
18761878
} else {
18771879
msg.extend(types.0.0);
18781880
}

0 commit comments

Comments
 (0)