Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #34216 - jseyfried:nested_cfg_attr, r=nrc
Support nested `cfg_attr` attributes Support arbitrarily deeply nested `cfg_attr` attributes (e.g. `#[cfg_attr(foo, cfg_attr(bar, baz))]`). This makes configuration idempotent. Currently, the nighties do not support any `cfg_attr` nesting. Stable and beta support just one level of `cfg_attr` nesting (expect for attributes on macro-expanded nodes, where no nesting is supported). This is a [breaking-change]. For example, the following would break: ```rust macro_rules! m { () => { #[cfg_attr(all(), cfg_attr(all(), cfg(foo)))] fn f() {} } } m!(); fn main() { f() } //~ ERROR unresolved name `f` ``` r? @nrc
- Loading branch information