You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gccrs: Support ZST type checking for #[repr(transparent)]
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h (BaseType::is_zero_sized): New function.
* typecheck/rust-tyty.cc (BaseType::is_zero_sized): Implement checking of
whether a type is zero-sized.
* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit (StructStruct)): Update
transparent repr type-checking to check for zero-sized members.
* backend/rust-compile-type.cc (TyTyResolveCompile::visit (TyTy::ADTType)): Support
compilation of transparent repr structs with more than 1 fields.
gcc/testsuite/ChangeLog:
* rust/compile/repr_transparent_fields.rs: Add new test case with PhantomData.
Signed-Off-By: Yap Zhi Heng <yapzhhg@gmail.com>
0 commit comments