Skip to main content

rustc_version_major

Macro rustc_version_major 

Source
rustc_version_major!() { /* proc-macro */ }
Expand description

Returns the Rust compiler major version as integer literal.

ยงExample

const RUSTC_VERSION: semver::Version = compile_time::rustc_version!();
assert_eq!(RUSTC_VERSION.major, compile_time::rustc_version_major!());