Description
When using declare_program! to generate a program that includes #[zero_copy(unsafe)] structs, Anchor automatically derives Debug and marks these structs with #[repr(Rust, packed)].
This triggers a Rust Internal Compiler Error because the derived Debug implementation creates references to fields in a packed struct:
error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:49:17: builtin derive created an unaligned reference
Reproduction
You can run cargo build in the demo repository to reproduce this issue.