Closed dtolnay closed 2 years ago
A function-like procedural macro named cfg! was disallowed prior to Rust 1.38:
cfg!
error: name `cfg` is reserved in macro namespace --> src/lib.rs:233:8 | 233 | pub fn cfg(input: TokenStream) -> TokenStream { | ^^^
but this restriction was lifted by https://github.com/rust-lang/rust/pull/62243 (https://github.com/rust-lang/rust/commit/327450797d460ae011eaaba68fae356117ab883d) and https://github.com/rust-lang/rust/pull/62476.
Usage:
if rustversion::cfg!(nightly) { ... } else { ... }
Closes #7.
A function-like procedural macro named
cfg!
was disallowed prior to Rust 1.38:but this restriction was lifted by https://github.com/rust-lang/rust/pull/62243 (https://github.com/rust-lang/rust/commit/327450797d460ae011eaaba68fae356117ab883d) and https://github.com/rust-lang/rust/pull/62476.
Usage:
Closes #7.