From ca4898c0f3590832d7a2ef84e8f4906e89d7f34e Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Fri, 13 Aug 2021 21:49:52 +0900 Subject: Use std.buuiltin instead of importing builtin Signed-off-by: Takeshi Yoneda --- lib/std/fs/wasi.zig | 2 +- lib/std/testing.zig | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/std') diff --git a/lib/std/fs/wasi.zig b/lib/std/fs/wasi.zig index b56854bb9e..378e4a7bac 100644 --- a/lib/std/fs/wasi.zig +++ b/lib/std/fs/wasi.zig @@ -169,7 +169,7 @@ pub const PreopenList = struct { }; test "extracting WASI preopens" { - if (std.builtin.os.tag != .wasi or @import("builtin").link_libc) return error.SkipZigTest; + if (std.builtin.os.tag != .wasi or std.builtin.link_libc) return error.SkipZigTest; var preopens = PreopenList.init(std.testing.allocator); defer preopens.deinit(); diff --git a/lib/std/testing.zig b/lib/std/testing.zig index fbf089a97e..3323ee239b 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -4,7 +4,6 @@ // The MIT license requires this copyright notice to be included in all copies // and substantial portions of the software. const std = @import("std.zig"); -const builtin = @import("builtin"); const math = std.math; const print = std.debug.print; @@ -328,7 +327,7 @@ pub const TmpDir = struct { }; fn getCwdOrWasiPreopen() std.fs.Dir { - if (std.builtin.os.tag == .wasi and !builtin.link_libc) { + if (std.builtin.os.tag == .wasi and !std.builtin.link_libc) { var preopens = std.fs.wasi.PreopenList.init(allocator); defer preopens.deinit(); preopens.populate() catch -- cgit v1.2.3