Add a `#[cfg_attr(..)]` syntax extension

cc #17490 

Reopening of #16230