diff options
Diffstat (limited to 'tests/ui/pin_project/packed_sneaky-4.rs')
-rw-r--r-- | tests/ui/pin_project/packed_sneaky-4.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/pin_project/packed_sneaky-4.rs b/tests/ui/pin_project/packed_sneaky-4.rs new file mode 100644 index 0000000..fb954ba --- /dev/null +++ b/tests/ui/pin_project/packed_sneaky-4.rs @@ -0,0 +1,15 @@ +// https://github.com/taiki-e/pin-project/issues/342 + +#![allow(unaligned_references)] + +use auxiliary_macro::hidden_repr2; +use pin_project::pin_project; + +#[pin_project] //~ ERROR reference to packed field is unaligned +#[hidden_repr2] +struct A { + #[pin] + f: u32, +} + +fn main() {} |