diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2020-10-17 18:04:53 -0600 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2020-11-19 18:59:21 +0200 |
| commit | 25ec2dbc1e2302d1138749262b588d3e438fcd55 (patch) | |
| tree | 34187fbd88b2e9b046f50cea93f482a191bc3248 /lib/std/meta.zig | |
| parent | 2b7781d82ad8d2234b89257676670957e005f214 (diff) | |
| download | zig-25ec2dbc1e2302d1138749262b588d3e438fcd55.tar.gz zig-25ec2dbc1e2302d1138749262b588d3e438fcd55.zip | |
Add builtin.Signedness, use it instead of is_signed
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index f1e9711b36..8919c2679a 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -718,15 +718,10 @@ pub fn declList(comptime Namespace: type, comptime Decl: type) []const *const De pub const IntType = @compileError("replaced by std.meta.Int"); -pub const Signedness = enum { - unsigned, - signed, -}; - -pub fn Int(comptime signedness: Signedness, comptime bit_count: u16) type { +pub fn Int(comptime signedness: builtin.Signedness, comptime bit_count: u16) type { return @Type(TypeInfo{ .Int = .{ - .is_signed = signedness == .signed, + .signedness = signedness, .bits = bit_count, }, }); |
