mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
More precise alignCast (allow for 32-bit targets)
This commit is contained in:
parent
457041a314
commit
3c74acafa4
4 changed files with 7 additions and 7 deletions
|
@ -247,7 +247,7 @@ pub const RocResult = extern struct {
|
|||
// - the tag is the first field
|
||||
// - the tag is usize bytes wide
|
||||
// - Ok has tag_id 1, because Err < Ok
|
||||
const usizes: [*]usize = @ptrCast([*]usize, @alignCast(8, self.bytes));
|
||||
const usizes: [*]usize = @ptrCast([*]usize, @alignCast(@alignOf(usize), self.bytes));
|
||||
|
||||
return usizes[0] == 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue