cfg-if icon indicating copy to clipboard operation
cfg-if copied to clipboard

A if/elif-like macro for Rust #[cfg] statements

Results 9 cfg-if issues
Sort by recently updated
recently updated
newest added

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.3. Release notes Sourced from actions/checkout's releases. v4.1.3 What's Changed Update actions/checkout version in update-main-version.yml by @​jww3 in actions/checkout#1650 Check git version before attempting to...

dependencies
github_actions

Fixed a simple grammar mistake in a comment.

**Summary:** This macro is currently allowed for statements, but is not allowed as an expression. But, I think it *could* work as an expression. **Repro:** Try this short program: ```...

Automated releases can help keep your releases consistent, transparent for users and, save maintainance time. It also improves the security of the release by using a "trusted builder". A "trusted...

TIL: https://lukaslueg.github.io/macro_railroad_wasm_demo It clearly shows that an `else` can be used solely without a leading `if. A quick jump into the compiler shows it as well: ```rust use cfg_if::cfg_if; fn...

Attempting the following: ```rust pub(crate) struct Args { cfg_if! { if #[cfg(feature = "my_feat")] { some_feature_gated_arg: u8, some_other_feature_gated_arg: u8, } else {} } // ... } ``` causes compile time...

I'm aware how minimal and stable this crate is and has been for a long time, but something that's always put me off from using it (usually in favor of...

It's quite convenient when you have multiple small conditions and want coherency across cfg handling (example with sysinfo crate): ```rust cfg_if::cfg_if! { if #[cfg(feature = "system")] { if #[cfg(not(feature =...

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.7. Release notes Sourced from actions/checkout's releases. v4.1.7 What's Changed Bump the minor-npm-dependencies group across 1 directory with 4 updates by @​dependabot in actions/checkout#1739 Bump...

dependencies
github_actions