summaryrefslogtreecommitdiffstats
path: root/tests/rust/cfg_field.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rust/cfg_field.rs')
-rw-r--r--tests/rust/cfg_field.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rust/cfg_field.rs b/tests/rust/cfg_field.rs
new file mode 100644
index 0000000..aed5165
--- /dev/null
+++ b/tests/rust/cfg_field.rs
@@ -0,0 +1,11 @@
+struct Foo {
+ #[cfg(windows)]
+ x: i32,
+}
+
+pub fn foo() {
+ Foo {
+ #[cfg(windows)]
+ x: 0,
+ };
+}