mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
std.fmt: add name of type in unsupport format string compile error
This commit is contained in:
parent
c2635f9b02
commit
fcf2ce0ffe
@ -544,7 +544,7 @@ pub fn formatType(
|
||||
return formatText(value, actual_fmt, options, writer);
|
||||
}
|
||||
}
|
||||
@compileError("Unknown format string: '" ++ actual_fmt ++ "'");
|
||||
@compileError("Unknown format string: '" ++ actual_fmt ++ "' for type '" ++ @typeName(T) ++ "'");
|
||||
},
|
||||
.Enum, .Union, .Struct => {
|
||||
return formatType(value.*, actual_fmt, options, writer, max_depth);
|
||||
@ -562,7 +562,7 @@ pub fn formatType(
|
||||
return formatText(mem.span(value), actual_fmt, options, writer);
|
||||
}
|
||||
}
|
||||
@compileError("Unknown format string: '" ++ actual_fmt ++ "'");
|
||||
@compileError("Unknown format string: '" ++ actual_fmt ++ "' for type '" ++ @typeName(T) ++ "'");
|
||||
},
|
||||
.Slice => {
|
||||
if (actual_fmt.len == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user