Landing: 1b839ec55be7

Project / Subsystem

gcc / gccrs

Date

2026-07-21

Author

Yap Zhi Heng

Commit

1b839ec55be7b93beb0118da19c267a0c4d3fcb9

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gccrs
patch_id
—
commit_hash
1b839ec55be7b93beb0118da19c267a0c4d3fcb9
source_type
github
headline
Small fixes for #[repr(transparent)] and ZST array edge case
tldr
GCC Rust compiler improves error message for #[repr(transparent)] and handles ZST array edge case.
author
Yap Zhi Heng
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • gccrs
  • • rust
  • • repr(transparent)
  • • typecheck
discussion_id_link
—
bugzilla_pr
—
date
2026-07-21T00:00:00.000Z

This commit includes minor corrections for the #[repr(transparent)] attribute in the GCC Rust compiler. It updates an error message (E0690) to use the correct variable for the number of fields in a struct. Additionally, it addresses an edge case in ArrayType::is_zero_sized where an array’s element type could be a zero-sized type (ZST) with a non-zero capacity, preventing incorrect size calculation.