Add parenthesis around suggestions to use .into()
on cast expr
#47699
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Given the following code:
rustc suggests
The suggestion should be enclosing the entire expression in parenthesis.
This was introduced in #47247. The solution is to change
needs_paren
to be inclusive of the precedence ofas
, in other words, change the<
with<=
and add a test for the behavior.The text was updated successfully, but these errors were encountered: