rust-reduce
rust-reduce copied to clipboard
`rust-reduce` will try to make the source file smaller by interpreting it as valid Rust code and intelligently removing parts of the code.
Fixes #5.
A run of `cargo fmt` has 200+ line changes (see #10). The available options for `rustfmt` are found [here](https://rust-lang.github.io/rustfmt/?version=master&search=).
Clearing a function body for example may make other functions dead code.
I had an `include_str` inside a module, so after module inlining the path had to be adjusted.
On osx running cargo test the test fails with: rust-reduce: run with initial input did not indicate success However when I debug through it, it doesn't fail there. Something fishy...
Any objections to a PR that walkdir to find .rs files in a crate's subdirs and then reduces them? Looking to use this as a way to reduce an ICE...
I tried using rust-reduce to troubleshoot https://github.com/immunant/c2rust/issues/183 and see if I reduce the cause of `cannot determine resolution for the derive macro` to something more manageable, but I get this...