const_fn
const_fn copied to clipboard
Remove const_fn(nightly) in favor of custom cfgs
As said in https://github.com/taiki-e/const_fn/pull/17#discussion_r475570000, to use the nightly only unstable feature, it needs to enable the feature at crate-level, and in any case, it needs build-script. So, this may not be very useful in practice.
This allows you to allow cfgs to be passed directly to const_fn.
- #[const_fn(cfg(my_cfg))]
+ #[const_fn(my_cfg)]
- #[const_fn(cfg(all(my_cfg1, my_cfg2)))]
+ #[const_fn(all(my_cfg1, my_cfg2))]