everybody_loops-0.1.1 is not a library.
everybody_loops
A Replacement for the -Z unpretty=everybody_loops
pass to rustc.
Usage
Take a file with a lot of functions, you want to get rid of them.
;
const f: =
Just run
everybody_loops file.rs
And now you have a with much simpler code.
;
const f: = ;
Installation
cargo install --locked everybody_loops
Limitations
This will not work for functions with impl Trait
in the return type, as the
compiller needs to ascribe a concreat type.
Prior Art
- This used to be a compiller feature, but it was removed in #93913
- This post by Felix S Klock II first inroduced me to this technique.
- The code is a thin wrapper over
syn
andprettyplease
, both by dtolnay, who diserves far more credit than me for making this happen.