Incorrect warn(unused_assignments) when assigned valued is compared with reference, but not read for value #53637
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
I found a spurious warn(unused_assignments) which I've condensed into the following small test case:
It complains that the value of
old_fullscreen
is never read, but surely it is, since I'm comparing to it. In the real program, this is part of a main loop for a graphical application, and the value is checked like this in each iteration.I checked for duplicated, and this does not seem to be related to #49171, which is about the ergonomics of a real warning, whereas this warning, if I understand correctly, should not be produced at all.
The text was updated successfully, but these errors were encountered: