mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Use repr(transparent) in glue for newtype wrappers
This commit is contained in:
parent
5b787aa218
commit
3a12aa26cc
1 changed files with 1 additions and 1 deletions
|
@ -328,7 +328,7 @@ fn add_single_tag_struct(
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut body = format!("#[repr(C)]\n{derive}\npub struct {name} ");
|
let mut body = format!("#[repr(transparent)]\n{derive}\npub struct {name} ");
|
||||||
|
|
||||||
if payload_fields.is_empty() {
|
if payload_fields.is_empty() {
|
||||||
// A single tag with no payload is a zero-sized unit type, so
|
// A single tag with no payload is a zero-sized unit type, so
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue