authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-05 11:03:54-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-05 11:03:54-07:00
log6b5d0b371111fd458e7fd0a1500f0d93914b5db1
tree01f263b5816e7293fc46e1cf53ec120d2c1395bb
parentfc40d2372335e69be175972ffabb55bc7fb77230

std: fix compile errors found by stage2

* redundant `comptime` * `try` outside function * `extern enum`

4 files changed, 6 insertions(+), 6 deletions(-)

lib/std/crypto/pcurves/common.zig+1-1
......@@ -43,7 +43,7 @@ pub fn Field(comptime params: FieldParams) type {
4343 pub const zero: Fe = Fe{ .limbs = mem.zeroes(Limbs) };
4444
4545 /// One.
46 pub const one = comptime one: {
46 pub const one = one: {
4747 var fe: Fe = undefined;
4848 fiat.setOne(&fe.limbs);
4949 break :one fe;
lib/std/crypto/pcurves/p256.zig+3-3
......@@ -30,8 +30,8 @@ pub const P256 = struct {
3030
3131 /// The P256 base point.
3232 pub const basePoint = P256{
33 .x = try Fe.fromInt(48439561293906451759052585252797914202762949526041747995844080717082404635286),
34 .y = try Fe.fromInt(36134250956749795798585127919587881956611106672985015071877198253568414405109),
33 .x = Fe.fromInt(48439561293906451759052585252797914202762949526041747995844080717082404635286) catch unreachable,
34 .y = Fe.fromInt(36134250956749795798585127919587881956611106672985015071877198253568414405109) catch unreachable,
3535 .z = Fe.one,
3636 .is_base = true,
3737 };
......@@ -39,7 +39,7 @@ pub const P256 = struct {
3939 /// The P256 neutral element.
4040 pub const identityElement = P256{ .x = Fe.zero, .y = Fe.one, .z = Fe.zero };
4141
42 pub const B = try Fe.fromInt(41058363725152142129326129780047268409114441015993725554835256314039467401291);
42 pub const B = Fe.fromInt(41058363725152142129326129780047268409114441015993725554835256314039467401291) catch unreachable;
4343
4444 /// Reject the neutral element.
4545 pub fn rejectIdentity(p: P256) IdentityElementError!void {
lib/std/x/net/tcp.zig+1-1
......@@ -49,7 +49,7 @@ pub const Connection = struct {
4949};
5050
5151/// Possible domains that a TCP client/listener may operate over.
52pub const Domain = extern enum(u16) {
52pub const Domain = enum(u16) {
5353 ip = os.AF_INET,
5454 ipv6 = os.AF_INET6,
5555};
lib/std/x/os/net.zig+1-1
......@@ -343,7 +343,7 @@ pub const IPv6 = extern struct {
343343 opts: fmt.FormatOptions,
344344 writer: anytype,
345345 ) !void {
346 comptime const specifier = &[_]u8{if (layout.len == 0) 'x' else switch (layout[0]) {
346 const specifier = comptime &[_]u8{if (layout.len == 0) 'x' else switch (layout[0]) {
347347 'x', 'X' => |specifier| specifier,
348348 's' => 'x',
349349 'S' => 'X',