A spec like `#[cfg(foo(bar))]` is not allowed as an attribute. This makes the same spec be rejected by the compiler if passed in as a `--cfg` argument. Fixes #31495