aboutsummaryrefslogtreecommitdiff
path: root/lib/std/meta
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-04 23:47:27 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-10-04 23:48:55 -0700
commit6115cf22404467fd13d0290fc022d51d372d139a (patch)
tree26c0bab951c81e89b5f0edcc5dc9f4b8e64df7db /lib/std/meta
parent78902db68bbd400f6d84b65280c31d417105f2a8 (diff)
downloadzig-6115cf22404467fd13d0290fc022d51d372d139a.tar.gz
zig-6115cf22404467fd13d0290fc022d51d372d139a.zip
migrate from `std.Target.current` to `@import("builtin").target`
closes #9388 closes #9321
Diffstat (limited to 'lib/std/meta')
-rw-r--r--lib/std/meta/trait.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/std/meta/trait.zig b/lib/std/meta/trait.zig
index d1590141a1..6b6124ebeb 100644
--- a/lib/std/meta/trait.zig
+++ b/lib/std/meta/trait.zig
@@ -1,5 +1,4 @@
const std = @import("../std.zig");
-const builtin = std.builtin;
const mem = std.mem;
const debug = std.debug;
const testing = std.testing;
@@ -98,7 +97,7 @@ test "std.meta.trait.hasField" {
try testing.expect(!hasField("value")(u8));
}
-pub fn is(comptime id: builtin.TypeId) TraitFn {
+pub fn is(comptime id: std.builtin.TypeId) TraitFn {
const Closure = struct {
pub fn trait(comptime T: type) bool {
return id == @typeInfo(T);
@@ -115,7 +114,7 @@ test "std.meta.trait.is" {
try testing.expect(!is(.Optional)(anyerror));
}
-pub fn isPtrTo(comptime id: builtin.TypeId) TraitFn {
+pub fn isPtrTo(comptime id: std.builtin.TypeId) TraitFn {
const Closure = struct {
pub fn trait(comptime T: type) bool {
if (!comptime isSingleItemPtr(T)) return false;
@@ -131,7 +130,7 @@ test "std.meta.trait.isPtrTo" {
try testing.expect(!isPtrTo(.Struct)(**struct {}));
}
-pub fn isSliceOf(comptime id: builtin.TypeId) TraitFn {
+pub fn isSliceOf(comptime id: std.builtin.TypeId) TraitFn {
const Closure = struct {
pub fn trait(comptime T: type) bool {
if (!comptime isSlice(T)) return false;