]> 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 0a863ca4979721e3f5df2ff14ac68df7e9787bd9..0f461b98bc737b035683458efb4534feb195279f 100644 (file)
@@ -4,7 +4,8 @@
 struct Foo {
     bar: u64,
 
-    #[cfg(test)] qux: u64,
+    #[cfg(test)]
+    qux: u64,
 }
 
 fn do_something() -> Foo {
@@ -23,7 +24,8 @@ fn main() {
 // #1462
 struct Foo {
     foo: usize,
-    #[cfg(feature = "include-bar")] bar: usize,
+    #[cfg(feature = "include-bar")]
+    bar: usize,
 }
 
 fn new_foo() -> Foo {
@@ -33,3 +35,28 @@ fn new_foo() -> Foo {
         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>,
+}