Open
Description
There could be a warning if something is checked outside of a function, passed inside the function and then checked inside the function again.
This might spot redundant conditions but also logic errors if the conditions are conflicting.
fn fun(awesomestruct: SomeStruct) {
if awesomestruct.bar { return } // check inside function
[...]
}
fn main() {
let struct: SomeStruct = something();
if struct.bar { // same condition that is inside of function
fun(struct);
}
}