]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/struct-field-attributes.rs
Tidy up and pass tests
[rust.git] / tests / target / struct-field-attributes.rs
index 2e5381a7e414be42fe8323f51ee91d74b74b1550..5d6e92a91d9f3786d7eb81beccc2a09e1869be5d 100644 (file)
@@ -20,3 +20,37 @@ fn do_something() -> Foo {
 fn main() {
     do_something();
 }
+
+// #1462
+struct Foo {
+    foo: usize,
+    #[cfg(feature = "include-bar")]
+    bar: usize,
+}
+
+fn new_foo() -> Foo {
+    Foo {
+        foo: 0,
+        #[cfg(feature = "include-bar")]
+        bar: 0,
+    }
+}
+
+// #2044
+pub enum State {
+    Closure(
+        #[cfg_attr(feature = "serde_derive", serde(state_with = "::serialization::closure"))]
+        GcPtr<ClosureData>,
+    ),
+}
+
+struct Fields(
+    #[cfg_attr(feature = "serde_derive", serde(state_with = "::base::serialization::shared"))]
+    Arc<Vec<InternedStr>>,
+);
+
+// #2309
+pub struct A {
+    #[doc = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]
+    pub foos: Vec<bool>,
+}