Add builtin.Signedness, use it instead of is_signed

This commit is contained in:
Tadeo Kondrak
2020-10-17 18:04:53 -06:00
committed by Veikka Tuominen
parent 2b7781d82a
commit 25ec2dbc1e
26 changed files with 149 additions and 150 deletions

View File

@@ -332,7 +332,7 @@ test "PackedIntArray" {
comptime var bits = 0;
inline while (bits <= max_bits) : (bits += 1) {
//alternate unsigned and signed
const sign: std.meta.Signedness = if (bits % 2 == 0) .signed else .unsigned;
const sign: builtin.Signedness = if (bits % 2 == 0) .signed else .unsigned;
const I = std.meta.Int(sign, bits);
const PackedArray = PackedIntArray(I, int_count);
@@ -384,7 +384,7 @@ test "PackedIntSlice" {
comptime var bits = 0;
inline while (bits <= max_bits) : (bits += 1) {
//alternate unsigned and signed
const sign: std.meta.Signedness = if (bits % 2 == 0) .signed else .unsigned;
const sign: builtin.Signedness = if (bits % 2 == 0) .signed else .unsigned;
const I = std.meta.Int(sign, bits);
const P = PackedIntSlice(I);