diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-07 12:18:41 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-07 12:18:41 -0500 |
| commit | 96c07674fc2293fa040212ab797c05436dc515b1 (patch) | |
| tree | 67b0bc649f4b4c384259a031269254a90078c0bd /lib/std/builtin.zig | |
| parent | bc75c0de6c8227d1c01b59c0d63f4d012e05496f (diff) | |
| parent | abe7305e169be2047d65f96e6525d3828684f058 (diff) | |
| download | zig-96c07674fc2293fa040212ab797c05436dc515b1.tar.gz zig-96c07674fc2293fa040212ab797c05436dc515b1.zip | |
Merge remote-tracking branch 'origin/master' into llvm10
Diffstat (limited to 'lib/std/builtin.zig')
| -rw-r--r-- | lib/std/builtin.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 08fc85871b..1190b595ef 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -27,7 +27,7 @@ pub const Cpu = std.Target.Cpu; /// On non-Windows targets, this is `null`. pub const subsystem: ?SubSystem = blk: { if (@hasDecl(@This(), "explicit_subsystem")) break :blk explicit_subsystem; - switch (os) { + switch (os.tag) { .windows => { if (is_test) { break :blk SubSystem.Console; @@ -406,9 +406,9 @@ pub const Version = struct { min: Version, max: Version, - pub fn includesVersion(self: LinuxVersionRange, ver: Version) bool { - if (self.min.compare(ver) == .gt) return false; - if (self.max.compare(ver) == .lt) return false; + pub fn includesVersion(self: Range, ver: Version) bool { + if (self.min.order(ver) == .gt) return false; + if (self.max.order(ver) == .lt) return false; return true; } }; |
