Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/cfgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ impl Struct {
}

struct Field {}

#[pin_data]
pub struct Struct2 {
// Test for cases where the type is not even defined when cfg is not satisfied.
#[cfg(any())]
non_exist: NonExistentType,
}
12 changes: 12 additions & 0 deletions tests/unsized.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use pin_init::*;

use std::sync::atomic::AtomicU32;

// Test that `?Sized` types can work as expected.
// If macro expansion is not careful it may types into positions that required they're typed.
#[pin_data]
#[repr(C)]
struct ArcInner<T: ?Sized> {
refcount: AtomicU32,
data: T,
}
Loading