update std.meta.IntType => std.meta.Int

master
Andrew Kelley 2020-05-01 06:49:30 -04:00
parent b70e6da914
commit 4044a77621
1 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ pub fn calcLimbLen(scalar: var) usize {
const T = @TypeOf(scalar); const T = @TypeOf(scalar);
switch (@typeInfo(T)) { switch (@typeInfo(T)) {
.Int => |info| { .Int => |info| {
const UT = if (info.is_signed) std.meta.IntType(false, info.bits - 1) else T; const UT = if (info.is_signed) std.meta.Int(false, info.bits - 1) else T;
return @sizeOf(UT) / @sizeOf(Limb); return @sizeOf(UT) / @sizeOf(Limb);
}, },
.ComptimeInt => { .ComptimeInt => {
@ -174,7 +174,7 @@ pub const Mutable = struct {
switch (@typeInfo(T)) { switch (@typeInfo(T)) {
.Int => |info| { .Int => |info| {
const UT = if (T.is_signed) std.meta.IntType(false, T.bit_count - 1) else T; const UT = if (T.is_signed) std.meta.Int(false, T.bit_count - 1) else T;
const needed_limbs = @sizeOf(UT) / @sizeOf(Limb); const needed_limbs = @sizeOf(UT) / @sizeOf(Limb);
assert(needed_limbs <= self.limbs.len); // value too big assert(needed_limbs <= self.limbs.len); // value too big
@ -1009,7 +1009,7 @@ pub const Const = struct {
pub fn to(self: Const, comptime T: type) ConvertError!T { pub fn to(self: Const, comptime T: type) ConvertError!T {
switch (@typeInfo(T)) { switch (@typeInfo(T)) {
.Int => { .Int => {
const UT = std.meta.IntType(false, T.bit_count); const UT = std.meta.Int(false, T.bit_count);
if (self.bitCountTwosComp() > T.bit_count) { if (self.bitCountTwosComp() > T.bit_count) {
return error.TargetTooSmall; return error.TargetTooSmall;