Skip to content

Commit 5ab97ba

Browse files
committed
WIP: get things compiling
1 parent 8fa660e commit 5ab97ba

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/std/fmt.zig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,15 @@ pub fn formatType(
362362
try output(context, "error.");
363363
return output(context, @errorName(value));
364364
},
365-
.Enum => {
365+
.Enum => |enumInfo| {
366366
if (comptime std.meta.trait.hasFn("format")(T)) {
367367
return value.format(fmt, options, context, Errors, output);
368368
}
369369

370+
if (!enumInfo.is_exhaustive) {
371+
return output(context, "TODO:non-exhaustive-enum");
372+
}
373+
370374
try output(context, @typeName(T));
371375
try output(context, ".");
372376
return formatType(@tagName(value), "", options, context, Errors, output, max_depth);

lib/std/os/bits/linux/errno-generic.zig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub const Errno = extern enum(u12) {
1+
pub const Errno = enum(u12) {
22
/// Operation not permitted
33
EPERM = 1,
44

@@ -120,8 +120,7 @@ pub const Errno = extern enum(u12) {
120120
ELOOP = 40,
121121

122122
/// Operation would block
123-
EWOULDBLOCK = EAGAIN,
124-
123+
// EWOULDBLOCK = 11, // Duplicate of EAGAIN
125124
/// No message of desired type
126125
ENOMSG = 42,
127126

@@ -280,7 +279,7 @@ pub const Errno = extern enum(u12) {
280279

281280
/// Operation not supported on transport endpoint
282281
EOPNOTSUPP = 95,
283-
ENOTSUP = EOPNOTSUPP,
282+
// ENOTSUP = 95, // Duplicate of EOPNOTSUPP
284283

285284
/// Protocol family not supported
286285
EPFNOSUPPORT = 96,

0 commit comments

Comments
 (0)