avoid format!
This commit is contained in:
parent
2e261a82f3
commit
35b42cb9ec
@ -1176,13 +1176,13 @@ impl<'a> Parser<'a> {
|
|||||||
struct AmbiguousPlus {
|
struct AmbiguousPlus {
|
||||||
pub sum_with_parens: String,
|
pub sum_with_parens: String,
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
#[suggestion(code = "{sum_with_parens}")]
|
#[suggestion(code = "({sum_with_parens})")]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
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_with_parens: format!("({})", pprust::ty_to_string(&ty)),
|
sum_with_parens: pprust::ty_to_string(&ty),
|
||||||
span: ty.span,
|
span: ty.span,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user