Skip to content

Commit e7ae9eb

Browse files
committed
rename sum_with_parens
1 parent 1e35bab commit e7ae9eb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

compiler/rustc_parse/src/parser/diagnostics.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ impl MultiSugg {
246246
#[derive(SessionDiagnostic)]
247247
#[error(slug = "parser-maybe-report-ambiguous-plus")]
248248
struct AmbiguousPlus {
249-
pub sum_with_parens: String,
249+
pub sum_ty: String,
250250
#[primary_span]
251-
#[suggestion(code = "({sum_with_parens})")]
251+
#[suggestion(code = "({sum_ty})")]
252252
pub span: Span,
253253
}
254254

@@ -1182,10 +1182,7 @@ impl<'a> Parser<'a> {
11821182
ty: &Ty,
11831183
) {
11841184
if matches!(allow_plus, AllowPlus::No) && impl_dyn_multi {
1185-
self.sess.emit_err(AmbiguousPlus {
1186-
sum_with_parens: pprust::ty_to_string(&ty),
1187-
span: ty.span,
1188-
});
1185+
self.sess.emit_err(AmbiguousPlus { sum_ty: pprust::ty_to_string(&ty), span: ty.span });
11891186
}
11901187
}
11911188

0 commit comments

Comments
 (0)