Open
Description
Problem
it is difficult to check if the version of rustc called by cargo and the version of rustc in the users environment are the same, either due to RUSTC or RUSTC_WRAPPER being set, or due to cargo being patched by a package manager such as nix.
Proposed Solution
when cargo rustc --version
is run, cargo should invoke rustc --version
following all the usual rules of how to find rustc, such as checking RUSTC and RUSTC_WRAPPER
Notes
you an kind of get the desired effect with RUSTFLAGS=--version
, but it's a bit of a hack.
`cargo rustc -- --version also doesn't exist for some reason.