]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/struct-field-attributes.rs
Fix static async closure qualifier order
[rust.git] / tests / target / struct-field-attributes.rs
index 2e5381a7e414be42fe8323f51ee91d74b74b1550..0f461b98bc737b035683458efb4534feb195279f 100644 (file)
@@ -20,3 +20,43 @@ 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>,
+}