cargo-mutants icon indicating copy to clipboard operation
cargo-mutants copied to clipboard

Delete statements

Open sourcefrog opened this issue 2 years ago • 0 comments

Split from #73, which has lots more good discussion.

To be reasonable this probably needs some exclusions for e.g. trace!(...), assert!, etc.

Possibly we should avoid deleting statements containing break, return, etc, as they might be too likely to cause hangs. This requires walking through the enclosed AST. There could be subtleties like if xx { loop { if yy { zz; break; } } }: in this case it's still OK to delete the outer if.

Maybe a good place to start, if possible, would be deleting assignments to existing variables, which seem to have a good chance of being important and viable.

sourcefrog avatar Dec 04 '23 18:12 sourcefrog