We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
format!
1 parent 2e261a8 commit 35b42cbCopy full SHA for 35b42cb
compiler/rustc_parse/src/parser/diagnostics.rs
@@ -1176,13 +1176,13 @@ impl<'a> Parser<'a> {
1176
struct AmbiguousPlus {
1177
pub sum_with_parens: String,
1178
#[primary_span]
1179
- #[suggestion(code = "{sum_with_parens}")]
+ #[suggestion(code = "({sum_with_parens})")]
1180
pub span: Span,
1181
}
1182
1183
if matches!(allow_plus, AllowPlus::No) && impl_dyn_multi {
1184
self.sess.emit_err(AmbiguousPlus {
1185
- sum_with_parens: format!("({})", pprust::ty_to_string(&ty)),
+ sum_with_parens: pprust::ty_to_string(&ty),
1186
span: ty.span,
1187
});
1188
0 commit comments