rename sum_with_parens
This commit is contained in:
parent
1e35bab104
commit
e7ae9eb3f2
1 changed files with 3 additions and 6 deletions
|
@ -246,9 +246,9 @@ impl MultiSugg {
|
||||||
#[derive(SessionDiagnostic)]
|
#[derive(SessionDiagnostic)]
|
||||||
#[error(slug = "parser-maybe-report-ambiguous-plus")]
|
#[error(slug = "parser-maybe-report-ambiguous-plus")]
|
||||||
struct AmbiguousPlus {
|
struct AmbiguousPlus {
|
||||||
pub sum_with_parens: String,
|
pub sum_ty: String,
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
#[suggestion(code = "({sum_with_parens})")]
|
#[suggestion(code = "({sum_ty})")]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1182,10 +1182,7 @@ impl<'a> Parser<'a> {
|
||||||
ty: &Ty,
|
ty: &Ty,
|
||||||
) {
|
) {
|
||||||
if matches!(allow_plus, AllowPlus::No) && impl_dyn_multi {
|
if matches!(allow_plus, AllowPlus::No) && impl_dyn_multi {
|
||||||
self.sess.emit_err(AmbiguousPlus {
|
self.sess.emit_err(AmbiguousPlus { sum_ty: pprust::ty_to_string(&ty), span: ty.span });
|
||||||
sum_with_parens: pprust::ty_to_string(&ty),
|
|
||||||
span: ty.span,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue