Error for chained less-than/greater-than comparisons misleading. #65659
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hi,
As I understand, chaining inequality operators like
<
,>
,<=
and>=
is not allowed. Yet trying to do so will ask you to add parenthesies:Gives:
The first error is false advice in the context of
<=
. It would have been ok for==
though.Thanks :)
The text was updated successfully, but these errors were encountered: