RFC for attributes on statements and blocks. by huonw · Pull Request #16 · rust-lang/rfcs (original) (raw)

…kfelix

See rust-lang/rfcs#16 and #15701

Examples:

let x = y;
{
      ...
}
assert_eq!((1, #[cfg(unset)] 2, 3), (1, 3));

let FOO = 0;

Implementation wise, there are a few rough corners and open questions:

let x = {
    #[cfg(foo)]
    Foo { data: x }
    #[cfg(not(foo))]
    Foo { data: y }
};