If you run cargo test --test compile-test and then run it again, everything gets rebuilt (this requires the most recent nightly).
This is because of this line:
This deletes all .rmeta files. With the recent changes to cargo for pipelining, cargo always generates rmeta files and expects them to not to be deleted.