Skip to content

Commit

Permalink
rename sum_with_parens
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Apr 27, 2022
1 parent 1e35bab commit e7ae9eb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions compiler/rustc_parse/src/parser/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down Expand Up @@ -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 });
}
}

Expand Down

0 comments on commit e7ae9eb

Please sign in to comment.