From d6b430b520103fb6691b2c18ae06c2f2a360e806 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 30 Jan 2023 18:53:14 -0700 Subject: [PATCH] std.Target: remove workaround This was working around a stage1 compiler bug. --- lib/std/target.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/std/target.zig b/lib/std/target.zig index 4964e75852..8ae175aac8 100644 --- a/lib/std/target.zig +++ b/lib/std/target.zig @@ -697,9 +697,6 @@ pub const Target = struct { pub const ShiftInt = std.math.Log2Int(usize); pub const empty = Set{ .ints = [1]usize{0} ** usize_count }; - pub fn empty_workaround() Set { - return Set{ .ints = [1]usize{0} ** usize_count }; - } pub fn isEmpty(set: Set) bool { return for (set.ints) |x| { @@ -782,7 +779,7 @@ pub const Target = struct { return struct { /// Populates only the feature bits specified. pub fn featureSet(features: []const F) Set { - var x = Set.empty_workaround(); // TODO remove empty_workaround + var x = Set.empty; for (features) |feature| { x.addFeature(@enumToInt(feature)); }