We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sum_with_parens
1 parent 1e35bab commit e7ae9ebCopy full SHA for e7ae9eb
compiler/rustc_parse/src/parser/diagnostics.rs
@@ -246,9 +246,9 @@ impl MultiSugg {
246
#[derive(SessionDiagnostic)]
247
#[error(slug = "parser-maybe-report-ambiguous-plus")]
248
struct AmbiguousPlus {
249
- pub sum_with_parens: String,
+ pub sum_ty: String,
250
#[primary_span]
251
- #[suggestion(code = "({sum_with_parens})")]
+ #[suggestion(code = "({sum_ty})")]
252
pub span: Span,
253
}
254
@@ -1182,10 +1182,7 @@ impl<'a> Parser<'a> {
1182
ty: &Ty,
1183
) {
1184
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
- });
+ self.sess.emit_err(AmbiguousPlus { sum_ty: pprust::ty_to_string(&ty), span: ty.span });
1189
1190
1191
0 commit comments