diff options
| author | topecongiro <seuchida@gmail.com> | 2017-05-12 17:58:38 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-05-12 17:58:38 +0900 |
| commit | 744fa427e2e62e074387392c567bc389d6c580e6 (patch) | |
| tree | 0f8ce97ed6ef8c157200332992c080f3edc3bfc0 /tests/source | |
| parent | 88250c4af2eccb1a5fd5d572893d2c42593c06eb (diff) | |
Support struct_field_attributes
Diffstat (limited to 'tests/source')
| -rw-r--r-- | tests/source/struct-field-attributes.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/source/struct-field-attributes.rs b/tests/source/struct-field-attributes.rs new file mode 100644 index 00000000000..2e5381a7e41 --- /dev/null +++ b/tests/source/struct-field-attributes.rs @@ -0,0 +1,22 @@ +// #1535 +#![feature(struct_field_attributes)] + +struct Foo { + bar: u64, + + #[cfg(test)] + qux: u64, +} + +fn do_something() -> Foo { + Foo { + bar: 0, + + #[cfg(test)] + qux: 1, + } +} + +fn main() { + do_something(); +} |
