We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fde497f + 2a50440 commit c36ba14Copy full SHA for c36ba14
2 files changed
tests/cfgs.rs
@@ -20,3 +20,10 @@ impl Struct {
20
}
21
22
struct Field {}
23
+
24
+#[pin_data]
25
+pub struct Struct2 {
26
+ // Test for cases where the type is not even defined when cfg is not satisfied.
27
+ #[cfg(any())]
28
+ non_exist: NonExistentType,
29
+}
tests/unsized.rs
@@ -0,0 +1,12 @@
1
+use pin_init::*;
2
3
+use std::sync::atomic::AtomicU32;
4
5
+// Test that `?Sized` types can work as expected.
6
+// If macro expansion is not careful it may types into positions that required they're typed.
7
8
+#[repr(C)]
9
+struct ArcInner<T: ?Sized> {
10
+ refcount: AtomicU32,
11
+ data: T,
12
0 commit comments