| ... | @@ -4,7 +4,7 @@ const std = @import("../std.zig"); | ... | @@ -4,7 +4,7 @@ const std = @import("../std.zig"); |
| 4 | const Io = std.Io; | 4 | const Io = std.Io; |
| 5 | const Allocator = std.mem.Allocator; | 5 | const Allocator = std.mem.Allocator; |
| 6 | const assert = std.debug.assert; | 6 | const assert = std.debug.assert; |
| 7 | const maxInt = std.math.maxInt; | 7 | const max_u32 = std.math.maxInt(u32); |
| 8 | | 8 | |
| 9 | string_bytes: []u8, | 9 | string_bytes: []u8, |
| 10 | steps: []Step, | 10 | steps: []Step, |
| ... | @@ -1094,7 +1094,7 @@ pub const LazyPath = union(@This().Tag) { | ... | @@ -1094,7 +1094,7 @@ pub const LazyPath = union(@This().Tag) { |
| 1094 | | 1094 | |
| 1095 | /// An index into `extra`, or `null`. | 1095 | /// An index into `extra`, or `null`. |
| 1096 | pub const OptionalIndex = enum(u32) { | 1096 | pub const OptionalIndex = enum(u32) { |
| 1097 | none = maxInt(u32), | 1097 | none = max_u32, |
| 1098 | _, | 1098 | _, |
| 1099 | | 1099 | |
| 1100 | pub fn unwrap(this: @This()) ?Index { | 1100 | pub fn unwrap(this: @This()) ?Index { |
| ... | @@ -1149,7 +1149,7 @@ pub const GeneratedFileIndex = enum(u32) { | ... | @@ -1149,7 +1149,7 @@ pub const GeneratedFileIndex = enum(u32) { |
| 1149 | }; | 1149 | }; |
| 1150 | | 1150 | |
| 1151 | pub const OptionalGeneratedFileIndex = enum(u32) { | 1151 | pub const OptionalGeneratedFileIndex = enum(u32) { |
| 1152 | none = maxInt(u32), | 1152 | none = max_u32, |
| 1153 | _, | 1153 | _, |
| 1154 | | 1154 | |
| 1155 | pub fn init(i: ?GeneratedFileIndex) OptionalGeneratedFileIndex { | 1155 | pub fn init(i: ?GeneratedFileIndex) OptionalGeneratedFileIndex { |
| ... | @@ -1169,7 +1169,7 @@ pub const Package = struct { | ... | @@ -1169,7 +1169,7 @@ pub const Package = struct { |
| 1169 | hash: String, | 1169 | hash: String, |
| 1170 | | 1170 | |
| 1171 | pub const Index = enum(u32) { | 1171 | pub const Index = enum(u32) { |
| 1172 | root = maxInt(u32), | 1172 | root = max_u32, |
| 1173 | _, | 1173 | _, |
| 1174 | | 1174 | |
| 1175 | /// Returns `null` for root package. | 1175 | /// Returns `null` for root package. |
| ... | @@ -1352,7 +1352,7 @@ pub const ImportTable = struct { | ... | @@ -1352,7 +1352,7 @@ pub const ImportTable = struct { |
| 1352 | | 1352 | |
| 1353 | /// Points into `extra`. | 1353 | /// Points into `extra`. |
| 1354 | pub const Index = enum(u32) { | 1354 | pub const Index = enum(u32) { |
| 1355 | invalid = maxInt(u32), | 1355 | invalid = max_u32, |
| 1356 | _, | 1356 | _, |
| 1357 | | 1357 | |
| 1358 | pub fn get(this: @This(), c: *const Configuration) ImportTable { | 1358 | pub fn get(this: @This(), c: *const Configuration) ImportTable { |
| ... | @@ -1385,7 +1385,7 @@ pub const Deps = struct { | ... | @@ -1385,7 +1385,7 @@ pub const Deps = struct { |
| 1385 | /// | 1385 | /// |
| 1386 | /// Stored identically to `Deps`. | 1386 | /// Stored identically to `Deps`. |
| 1387 | pub const OptionalStringList = enum(u32) { | 1387 | pub const OptionalStringList = enum(u32) { |
| 1388 | none = maxInt(u32), | 1388 | none = max_u32, |
| 1389 | _, | 1389 | _, |
| 1390 | | 1390 | |
| 1391 | pub fn slice(osl: OptionalStringList, c: *const Configuration) ?[]const String { | 1391 | pub fn slice(osl: OptionalStringList, c: *const Configuration) ?[]const String { |
| ... | @@ -1414,11 +1414,11 @@ pub const Path = extern struct { | ... | @@ -1414,11 +1414,11 @@ pub const Path = extern struct { |
| 1414 | }; | 1414 | }; |
| 1415 | | 1415 | |
| 1416 | pub const InstallDestDir = enum(u32) { | 1416 | pub const InstallDestDir = enum(u32) { |
| 1417 | none = maxInt(u32) - 4, | 1417 | none = max_u32 - 4, |
| 1418 | prefix = maxInt(u32) - 3, | 1418 | prefix = max_u32 - 3, |
| 1419 | lib = maxInt(u32) - 2, | 1419 | lib = max_u32 - 2, |
| 1420 | bin = maxInt(u32) - 1, | 1420 | bin = max_u32 - 1, |
| 1421 | header = maxInt(u32), | 1421 | header = max_u32, |
| 1422 | /// A `String` path relative to the prefix. | 1422 | /// A `String` path relative to the prefix. |
| 1423 | _, | 1423 | _, |
| 1424 | | 1424 | |
| ... | @@ -1433,7 +1433,7 @@ pub const OptionalString = enum(u32) { | ... | @@ -1433,7 +1433,7 @@ pub const OptionalString = enum(u32) { |
| 1433 | empty = 0, | 1433 | empty = 0, |
| 1434 | /// The string "root". | 1434 | /// The string "root". |
| 1435 | root = 1, | 1435 | root = 1, |
| 1436 | none = maxInt(u32), | 1436 | none = max_u32, |
| 1437 | _, | 1437 | _, |
| 1438 | | 1438 | |
| 1439 | pub fn init(s: String) OptionalString { | 1439 | pub fn init(s: String) OptionalString { |
| ... | @@ -1633,7 +1633,7 @@ pub const ResolvedTarget = struct { | ... | @@ -1633,7 +1633,7 @@ pub const ResolvedTarget = struct { |
| 1633 | }; | 1633 | }; |
| 1634 | | 1634 | |
| 1635 | pub const OptionalIndex = enum(u32) { | 1635 | pub const OptionalIndex = enum(u32) { |
| 1636 | none = maxInt(u32), | 1636 | none = max_u32, |
| 1637 | _, | 1637 | _, |
| 1638 | | 1638 | |
| 1639 | pub fn unwrap(this: @This()) ?Index { | 1639 | pub fn unwrap(this: @This()) ?Index { |
| ... | @@ -1678,7 +1678,7 @@ pub const TargetQuery = struct { | ... | @@ -1678,7 +1678,7 @@ pub const TargetQuery = struct { |
| 1678 | }; | 1678 | }; |
| 1679 | | 1679 | |
| 1680 | pub const OptionalIndex = enum(u32) { | 1680 | pub const OptionalIndex = enum(u32) { |
| 1681 | none = maxInt(u32), | 1681 | none = max_u32, |
| 1682 | _, | 1682 | _, |
| 1683 | | 1683 | |
| 1684 | pub fn init(i: Index) OptionalIndex { | 1684 | pub fn init(i: Index) OptionalIndex { |