Files
rust/src/libsyntax
bors e357178146 Auto merge of #38814 - Ralith:cfg-fields, r=jseyfried
syntax: enable attributes and cfg on struct fields

This enables conditional compilation of field initializers in a struct literal, simplifying construction of structs whose fields are themselves conditionally present. For example, the intializer for the constant in the following becomes legal, and has the intuitive effect:

```rust
struct Foo {
    #[cfg(unix)]
    bar: (),
}

const FOO: Foo = Foo {
    #[cfg(unix)]
    bar: (),
};
```

It's not clear to me whether this calls for the full RFC process, but the implementation was simple enough that I figured I'd begin the conversation with code.
2017-01-12 20:44:02 +00:00
..
2017-01-11 21:33:17 -08:00
2016-12-30 15:15:44 +01:00
2016-11-21 09:00:56 +00:00
2016-11-23 23:44:17 -08:00