about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2022-12-07 11:32:26 -0800
committerEsteban Küber <esteban@kuber.com.ar>2022-12-11 09:46:02 -0800
commitc77ad2d76576b97f6b2ea8c8b5ddb672c3383512 (patch)
treefaabc591007323f2005c7be2cf3576957ba10436 /compiler/rustc_trait_selection/src/traits
parent71db025cfa85ea3c1e7d628f4c596ca498c7acf0 (diff)
Remove mention of "assoc type" in label as it is already in the `note` message
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index 87ab863fa7b..bef2a067ae3 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -3011,7 +3011,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                                     primary_spans.push(span);
                                     span_labels.push((
                                         span,
-                                        format!("associated type `{assoc}` is `{ty}` here"),
+                                        format!("`{assoc}` is `{ty}` here"),
                                     ));
                                 }
                                 break;
@@ -3025,15 +3025,13 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                                             primary_spans.push(span);
                                             span_labels.push((
                                                 span,
-                                                format!("associated type `{assoc}` changed to `{ty}` here"),
+                                                format!("`{assoc}` changed to `{ty}` here"),
                                             ));
                                         }
                                     }
                                     (Some((span, (assoc, ty))), None) => {
-                                        span_labels.push((
-                                            span,
-                                            format!("associated type `{assoc}` is `{ty}` here"),
-                                        ));
+                                        span_labels
+                                            .push((span, format!("`{assoc}` is `{ty}` here")));
                                     }
                                     (None, Some(_)) | (None, None) => {}
                                 }
@@ -3055,7 +3053,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                                 multi_span,
                                 format!(
                                     "the method call chain might not have had the expected \
-                                        associated types",
+                                     associated types",
                                 ),
                             );
                         }