Skip to main content

rustc_version

Function rustc_version 

Source
pub fn rustc_version() -> Result<String, String>
Expand description

The rustc version the artifact would compile under: $RUSTC when set (the pinned-toolchain convention every build script here follows), rustc otherwise. The version string is the input, not a parsed triple — rustc --version is what a human compares.

§Errors

If rustc cannot be run: an artifact address computed without knowing the compiler would silently collide across toolchains.