-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied
Description
Clippy suggests changing return { e } + 10;
to { x } + 10
instead of ({ x }) + 10
or ({ x } + 10)
, and that doesn't compile.
I'm not sure what it should do, always parenthesise the inner span? rustfmt
doesn't fix that, and it would be a bit ugly. Should it recurse into the expression to see if there are any blocks?
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied