Skip to content

Commit

Permalink
add test for deriving CheckedBitPattern on packed struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Freax13 committed Dec 28, 2024
1 parent 4d4106b commit be10405
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions derive/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ struct CheckedBitPatternAlignedStruct {
a: u16,
}

#[derive(Clone, Copy, CheckedBitPattern)]
#[repr(C, packed)]
struct CheckedBitPatternPackedStruct {
a: u8,
b: u16,
}

#[derive(Debug, Clone, Copy, CheckedBitPattern, PartialEq, Eq)]
#[repr(C)]
enum CheckedBitPatternCDefaultDiscriminantEnumWithFields {
Expand Down

0 comments on commit be10405

Please sign in to comment.