I wrote a jq filter that can find installed crates that were built with an older (or unknown) compiler.
Here's the command line:
jq -r '.installs|to_entries|.|select(.value.rustc//""|startswith("'"$(rustc --version)"'")|not)|.key|split(" ")|.' ~/.cargo/.crates2.json
You can pipe it into
|xargs cargo install --force --
to rebuild them with the current compiler.