restriction lint: subcondition side-effects #2215
Labels
A-lint
Area: New lints
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
L-correctness
Lint: Belongs in the correctness lint group
T-middle
Type: Probably requires verifiying types
So disclaimer, I'm not sure if this is a necessary lint (anyone with input see my rust forum post https://users.rust-lang.org/t/evaluation-order-of-boolean-subconditions/13748). But I have the feeling that boolean subcondition execution order is probably not guaranteed like in C and C++. Therefore, if a user had side-effects in a subcondition program behaviour could change significantly due to something like a changed optimisation flag.
Below is some code which should be warned against if this lint is necessary. If this is an issue I wouldn't mind implementing the lint to help out 😄
The text was updated successfully, but these errors were encountered: