about summary refs log tree commit diff
path: root/src/libsyntax/util
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-06-16 03:49:55 -0700
committerGitHub <noreply@github.com>2016-06-16 03:49:55 -0700
commit6edea2cfda2818f0a76f4bac2d18a30feb54c137 (patch)
tree7e1059c82609fdf0a9560c9aa6a524d22fb821ad /src/libsyntax/util
parenta479a6a7a6fa1bfe1f18d7d7411ad14e7b8ca17b (diff)
parent65d256e82a26ca6e72e6668adb66a284b4ad7ba1 (diff)
downloadrust-6edea2cfda2818f0a76f4bac2d18a30feb54c137.tar.gz
rust-6edea2cfda2818f0a76f4bac2d18a30feb54c137.zip
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
Diffstat (limited to 'src/libsyntax/util')
0 files changed, 0 insertions, 0 deletions