thunk: fix slightly confusing compile errors
The error messages not on the slice detection code path should not be talking about slices.
This commit is contained in:
parent
b17a3fba6c
commit
42d0b24710
@ -23,7 +23,7 @@ pub fn checkUserDataType(comptime T: type) void {
|
|||||||
.Optional => |info| switch (@typeInfo(info.child)) {
|
.Optional => |info| switch (@typeInfo(info.child)) {
|
||||||
.Optional => @compileError(
|
.Optional => @compileError(
|
||||||
"nats callbacks can only accept an (optional) single, many," ++
|
"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.",
|
@typeName(T) ++ "\" has more than one optional specifier.",
|
||||||
),
|
),
|
||||||
else => checkUserDataType(info.child),
|
else => checkUserDataType(info.child),
|
||||||
@ -38,7 +38,7 @@ pub fn checkUserDataType(comptime T: type) void {
|
|||||||
},
|
},
|
||||||
else => @compileError(
|
else => @compileError(
|
||||||
"nats callbacks can only accept an (optional) single, many," ++
|
"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.",
|
@typeName(T) ++ "\" is not a pointer type.",
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user