Expand description
§rustc-version-const
Makes the current rustc version available via a const fn at runtime.
The version detection happens automatically at build-time.
§Usage
Here is a simple example that demonstrates how to use rustc_version() in your code:
use rustc_version_const::{rustc_version, rustc_version_full};
const RUSTC_VERSION: &str = rustc_version();
fn main() {
println!("rustc version: \"{}\"", RUSTC_VERSION);
}Functions§
- rustc_
version - Returns the
rustcversion that was used to build this application - rustc_
version_ full - Returns the
rustcversion that was used to build this application