aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-03 17:55:55 -0500
committerGitHub <noreply@github.com>2022-03-03 17:55:55 -0500
commit6c045f9e83434e98fbfbd7c511e673274cb22afc (patch)
tree35ba6d6b69a3df9f661ba64202f31e0d8b1b6e5f /src/type.zig
parent3605dd307ffff74726cc0ce5099599f1a6f9ddb2 (diff)
parentaa7cbca7d37bb2cd7794ffa401193cdc3f5f9849 (diff)
downloadzig-6c045f9e83434e98fbfbd7c511e673274cb22afc.tar.gz
zig-6c045f9e83434e98fbfbd7c511e673274cb22afc.zip
Merge pull request #11047 from Vexu/stage2
Stage2: make `expectEqualSlices` work
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/type.zig b/src/type.zig
index a4dafec74a..ef794ffe74 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -2170,11 +2170,7 @@ pub const Type = extern union {
.optional_single_mut_pointer,
=> {
const child_type = self.cast(Payload.ElemType).?.data;
- if (child_type.zigTypeTag() == .Opaque) {
- return 1;
- } else {
- return child_type.abiAlignment(target);
- }
+ return child_type.abiAlignment(target);
},
.manyptr_u8,
@@ -2188,8 +2184,6 @@ pub const Type = extern union {
const ptr_info = self.castTag(.pointer).?.data;
if (ptr_info.@"align" != 0) {
return ptr_info.@"align";
- } else if (ptr_info.pointee_type.zigTypeTag() == .Opaque) {
- return 1;
} else {
return ptr_info.pointee_type.abiAlignment(target);
}
@@ -2246,6 +2240,7 @@ pub const Type = extern union {
.export_options,
.extern_options,
.@"opaque",
+ .anyopaque,
=> return 1,
.fn_noreturn_no_args, // represents machine code; not a pointer
@@ -2419,7 +2414,6 @@ pub const Type = extern union {
.empty_struct,
.void,
- .anyopaque,
.empty_struct_literal,
.type,
.comptime_int,