about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorChristian Poveda <git@pvdrz.com>2022-04-27 12:03:16 +0200
committerChristian Poveda <git@pvdrz.com>2022-04-27 12:03:16 +0200
commite7ae9eb3f272a96c2c73363539ca31986e5d5e88 (patch)
treeaf174d31ebdd510da4c058175bca4a1545b649d0 /compiler/rustc_parse/src
parent1e35bab1047a9969e363d55159c466f965e7c726 (diff)
downloadrust-e7ae9eb3f272a96c2c73363539ca31986e5d5e88.tar.gz
rust-e7ae9eb3f272a96c2c73363539ca31986e5d5e88.zip
rename `sum_with_parens`
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index e8dc0b3a684..4edc9b39efc 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -246,9 +246,9 @@ impl MultiSugg {
 #[derive(SessionDiagnostic)]
 #[error(slug = "parser-maybe-report-ambiguous-plus")]
 struct AmbiguousPlus {
-    pub sum_with_parens: String,
+    pub sum_ty: String,
     #[primary_span]
-    #[suggestion(code = "({sum_with_parens})")]
+    #[suggestion(code = "({sum_ty})")]
     pub span: Span,
 }
 
@@ -1182,10 +1182,7 @@ impl<'a> Parser<'a> {
         ty: &Ty,
     ) {
         if matches!(allow_plus, AllowPlus::No) && impl_dyn_multi {
-            self.sess.emit_err(AmbiguousPlus {
-                sum_with_parens: pprust::ty_to_string(&ty),
-                span: ty.span,
-            });
+            self.sess.emit_err(AmbiguousPlus { sum_ty: pprust::ty_to_string(&ty), span: ty.span });
         }
     }