aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-07 13:06:21 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-07 13:06:21 -0700
commit090834380cff9f2743f9c71e8e141ac5aceb747e (patch)
treeed0737b7dd104f8c6d10968640eafefe2015aafa /src/type.zig
parente32898b0dedf1da13798f798d2825113b0be748b (diff)
downloadzig-090834380cff9f2743f9c71e8e141ac5aceb747e.tar.gz
zig-090834380cff9f2743f9c71e8e141ac5aceb747e.zip
Type: use isPtrLikeOptional instead of isAbiPtr
Thanks @Vexu
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/type.zig b/src/type.zig
index dfd021617e..a542f9a6fa 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -139,7 +139,7 @@ pub const Type = extern union {
=> false,
.Pointer => is_equality_cmp or ty.isCPtr(),
- .Optional => is_equality_cmp and ty.isAbiPtr(),
+ .Optional => is_equality_cmp and ty.isPtrLikeOptional(),
};
}
@@ -1619,11 +1619,6 @@ pub const Type = extern union {
}
}
- /// Returns whether the type is represented as a pointer in the ABI.
- pub fn isAbiPtr(self: Type) bool {
- @panic("TODO implement this");
- }
-
/// Asserts that the type is an error union.
pub fn errorUnionChild(self: Type) Type {
return switch (self.tag()) {