diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-10-25 02:41:55 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-11-02 03:08:04 +0000 |
| commit | 86b59656081d2dd03ef42d9d30d7141b1fc3b5f1 (patch) | |
| tree | 79396cea6bc8f3c4c130b1173d2bec520223b4d1 /compiler | |
| parent | c6017badb4ca22b85c70916746c233340be53c97 (diff) | |
| download | rust-86b59656081d2dd03ef42d9d30d7141b1fc3b5f1.tar.gz rust-86b59656081d2dd03ef42d9d30d7141b1fc3b5f1.zip | |
Use `short_ty_string`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> { 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); } |
