1
Fork 0

Suggest wrapping mac args in parens rather than the whole expression

This commit is contained in:
Michael Goulet 2023-12-18 03:01:05 +00:00
parent c1c7707238
commit ec263df5e4
5 changed files with 45 additions and 23 deletions

View file

@ -1844,7 +1844,7 @@ impl<'a> Parser<'a> {
let lexpr = self.parse_expr_labeled(label, true)?;
self.dcx().emit_err(errors::LabeledLoopInBreak {
span: lexpr.span,
sub: errors::WrapExpressionInParentheses {
sub: errors::WrapInParentheses::Expression {
left: lexpr.span.shrink_to_lo(),
right: lexpr.span.shrink_to_hi(),
},