Fix incorrect gating of nonterminals in key-value attributes#85445
Fix incorrect gating of nonterminals in key-value attributes#85445Aaron1011 wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
Fixes rust-lang#85432 When processing a `#[derive]` or `#[cfg_eval]` attribute, we need to re-parse our attribute target, which requires flattenting all `Nonterminals`. However, this caused us to incorrectly gate on a (flattented) nonterminal in a key-value attribute, which is supposed to be allowed. Since we already perform this gating during the initial parse, we suppress it in `capture_cfg` mode.
|
@hellow554 - I added a test locally, but forgot to |
47e4e06 to
fd1e19e
Compare
|
@Aaron1011 this should already be fixed by #83366, which is waiting on bors. |
|
@jyn514: Backporting this PR would be much simpler, since it's a one-line diff. |
|
nevertheless, the test should be included in either PR, probably in this one, because the other one is already approved to bors |
|
☔ The latest upstream changes (presumably #85458) made this pull request unmergeable. Please resolve the merge conflicts. |
davidtwco
left a comment
There was a problem hiding this comment.
Looks good to me, is my understanding correct that we don't want to r+ this, only backport?
|
@davidtwco: That's right - now that gating has been removed entirely (since |
|
@Aaron1011 make you you update this to point to beta, right now the target branch is master |
…ulacrum [beta] backports * Disable the machine outliner by default rust-lang#86020 * Fix incorrect gating of nonterminals in key-value attributes rust-lang#85445 * Build crtbegin.o/crtend.o from source code rust-lang#85395 * Bring back x86_64-sun-solaris target to rustup rust-lang#85252 * Preserve SyntaxContext for invalid/dummy spans in crate metadata rust-lang#85211 * [beta] backport: Remove unsound TrustedRandomAccess implementations rust-lang#86222 r? `@Mark-Simulacrum`
|
So, should this be closed? |
|
Yes. |
Fixes #85432
When processing a
#[derive]or#[cfg_eval]attribute, we need tore-parse our attribute target, which requires flattenting all
Nonterminals. However, this caused us to incorrectly gate on a(flattented) nonterminal in a key-value attribute, which is supposed to
be allowed.
Since we already perform this gating during the initial parse, we
suppress it in
capture_cfgmode.