diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 16d056ed0f..74ddd1dccf 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -287,7 +287,7 @@ pub const Operation = union(enum) { LockViolation, } || Io.UnexpectedError; - pub const Result = usize; + pub const Result = Error!usize; }; pub const Result = Result: { @@ -296,7 +296,7 @@ pub const Operation = union(enum) { var field_types: [operation_fields.len]type = undefined; for (operation_fields, &field_names, &field_types) |field, *field_name, *field_type| { field_name.* = field.name; - field_type.* = field.type.Error!field.type.Result; + field_type.* = field.type.Result; } break :Result @Union(.auto, Tag, &field_names, &field_types, &@splat(.{})); };