dtolnay / rustversion

Conditional compilation according to rustc compiler version
Apache License 2.0
326 stars 15 forks source link

Get rustc version string at rustversion crate build time #11

Closed jsgf closed 4 years ago

jsgf commented 4 years ago

Summary:There's no need to fetch the rustc version at proc-macro invocation time because its always constant for a given compilation of the crate. Since Rust doesn't have a stable ABI, the compiler used to compile rustversion is guaranteed to be the same as the one invoking the rustversion proc macro.