core: allow cli actions to use arg parsing diagnostics

This commit is contained in:
Jeffrey C. Ollie
2024-12-17 13:07:48 -06:00
parent 2725d5ecb3
commit 97a2b94c9b

View File

@ -126,7 +126,7 @@ pub fn parse(
// The error set is dependent on comptime T, so we always add
// an extra error so we can have the "else" below.
const ErrSet = @TypeOf(err) || error{Unknown};
const ErrSet = @TypeOf(err) || error{ Unknown, OutOfMemory };
const message: [:0]const u8 = switch (@as(ErrSet, @errorCast(err))) {
// OOM is not recoverable since we need to allocate to
// track more error messages.