File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
compiler/rustc_parse/src/parser Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -246,9 +246,9 @@ impl MultiSugg {
246
246
#[ derive( SessionDiagnostic ) ]
247
247
#[ error( slug = "parser-maybe-report-ambiguous-plus" ) ]
248
248
struct AmbiguousPlus {
249
- pub sum_with_parens : String ,
249
+ pub sum_ty : String ,
250
250
#[ primary_span]
251
- #[ suggestion( code = "({sum_with_parens })" ) ]
251
+ #[ suggestion( code = "({sum_ty })" ) ]
252
252
pub span : Span ,
253
253
}
254
254
@@ -1182,10 +1182,7 @@ impl<'a> Parser<'a> {
1182
1182
ty : & Ty ,
1183
1183
) {
1184
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
- } ) ;
1185
+ self . sess . emit_err ( AmbiguousPlus { sum_ty : pprust:: ty_to_string ( & ty) , span : ty. span } ) ;
1189
1186
}
1190
1187
}
1191
1188
You can’t perform that action at this time.
0 commit comments