Today I learnt that `cargo fix` won't fix code with compiler errors by default, but you can override this!
$ cargo fix --broken-code --allow-dirty && cargo clippy --fix --allow-dirty
This incantation does exactly what I wanted :)
miniblog.
Related Posts
Co-Authored-By: An old Stack Overflow answer, blindly accepting the compiler's suggestions, and a linter.
I would have thought that invoking a C compiler would be a solved problem. Looking at Rust's cc crate there's a remarkable long tail of corner cases to fix.
Exotic CPUs, microarchitectures, compiler differences, operating system differences, etc.
I find it really interesting how some areas of tech are widely expected to improve radically (e.g. LLMs and smart home tech), others gradually (CPU speed, battery capacity) and others very slowly (e.g. compiler optimisations).
Predicting the future is hard.