From 4f26bf8fca12f20681c05946c3f04228377423b1 Mon Sep 17 00:00:00 2001 From: torque Date: Sat, 6 Apr 2024 15:01:03 -0700 Subject: [PATCH] thunk: fix slightly confusing compile errors The error messages not on the slice detection code path should not be talking about slices. --- src/thunk.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thunk.zig b/src/thunk.zig index 52ad9b8..bfd1f2c 100644 --- a/src/thunk.zig +++ b/src/thunk.zig @@ -23,7 +23,7 @@ pub fn checkUserDataType(comptime T: type) void { .Optional => |info| switch (@typeInfo(info.child)) { .Optional => @compileError( "nats callbacks can only accept an (optional) single, many," ++ - " or c pointer as userdata, not slices. \"" ++ + " or c pointer as userdata. \"" ++ @typeName(T) ++ "\" has more than one optional specifier.", ), else => checkUserDataType(info.child), @@ -38,7 +38,7 @@ pub fn checkUserDataType(comptime T: type) void { }, else => @compileError( "nats callbacks can only accept an (optional) single, many," ++ - " or c pointer as userdata, not slices. \"" ++ + " or c pointer as userdata. \"" ++ @typeName(T) ++ "\" is not a pointer type.", ), }