Function build_data::set_RUSTC_VERSION[][src]

pub fn set_RUSTC_VERSION()

Sets the RUSTC_VERSION env variable to the output of rustc --version.

Call this from build.rs. Use env! in your main.rs to use the variable.

Example value: "rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)"

Executes the rustc command.

Panics

Panics if it fails to get the value from rustc.