manual_flatten suggestin make code not compilable #6784
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint name:
manual_flatten
I tried this code:
Code is simplified so
workers
are never set, but to trigger the incorrect sugestion it is enough.The full code starts same with all workers doing nothing, and later in the loop assign work to them, and here early in the loop let them finish the work if it is the right time.
I expected to see this happen: No suggestion probably.
Instead, this happened:
In this simplified example line 9
*w = None;
is visible.Am I missing a way how to handle this line? I asked on Rust community server and no one find a way how to make this work, so I think it must be false positive.
Meta
cargo clippy -V
: clippy 0.1.52 (fe1bf8e 2021-02-23)rustc -Vv
:The text was updated successfully, but these errors were encountered: