rust/src/libsyntax_ext
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
..
deriving Auto merge of #38814 - Ralith:cfg-fields, r=jseyfried 2017-01-12 20:44:02 +00:00
asm.rs Use Symbol instead of InternedString in the AST, HIR, and various other places. 2016-11-21 09:00:55 +00:00
Cargo.toml rustc: Rename rustc_macro to proc_macro 2016-10-06 11:07:23 -07:00
cfg.rs Move CrateConfig from Crate to ParseSess. 2016-10-29 07:52:58 +00:00
concat.rs Use Symbol instead of InternedString in the AST, HIR, and various other places. 2016-11-21 09:00:55 +00:00
concat_idents.rs Refactor how global paths are represented (for both ast and hir). 2016-12-22 06:14:35 +00:00
env.rs Use Symbol instead of InternedString in the AST, HIR, and various other places. 2016-11-21 09:00:55 +00:00
format.rs Use Symbol instead of InternedString in the AST, HIR, and various other places. 2016-11-21 09:00:55 +00:00
format_foreign.rs Add foreign formatting directive detection. 2016-11-11 15:23:15 +11:00
lib.rs Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrc 2017-01-08 08:22:06 +00:00
log_syntax.rs make emit_feature_err take a ParseSess 2016-09-26 07:07:41 +02:00
proc_macro_registrar.rs rustc: Stabilize the proc_macro feature 2017-01-02 12:13:30 -08:00
trace_macros.rs Move syntax::util::interner -> syntax::symbol, cleanup. 2016-11-20 23:40:20 +00:00