It’s just part of the cargo fix
command, it does all manner of things like fix obvious compilation errors to full things like completely read in the entire project as internal AST from one version of code and then spit it out as another version. Like here is how to use it to migrate to the latest edition (in short just run cargo fix --edition
then update your Cargo.toml
file to the latest edition, or see the advanced page for how to migrate to lower editions too), but it can do more than that as well. Basically cargo fix
does all manner of things related to reading in the code as an AST and then working on it ‘as’ an AST before spitting it back out as a syntax file.
3 Likes