| author | |
| committer | |
| log | 8f943b3d33432a26b7e242c1181e4220ed400501 |
| tree | 712dffc9ca883babf3816a9856af24968b4265b1 |
| parent | e867127a6cc3e0148101f08d846c876f62e839c1 |
This is really minor but the issue this fixes is that if you copy-paste this output of `--show-builtin` into your `build.zig` for example then the formatter will format
```
pub const os = std.Target.Os{
.tag = .freestanding,
.version_range = .{ .none = {} }
};
```
to
```
pub const os = std.Target.Os{ .tag = .freestanding, .version_range = .{ .none = {} } };
```
which doesn't match the output.
With this comma, the output will stay the way it is after a `zig fmt`.1 files changed, 1 insertions(+), 1 deletions(-)
src/Compilation.zig+1-1| ... | ... | @@ -4812,7 +4812,7 @@ pub fn generateBuiltinZigSource(comp: *Compilation, allocator: Allocator) Alloca |
| 4812 | 4812 | ); |
| 4813 | 4813 | |
| 4814 | 4814 | switch (target.os.getVersionRange()) { |
| 4815 | .none => try buffer.appendSlice(" .none = {} }\n"), | |
| 4815 | .none => try buffer.appendSlice(" .none = {} },\n"), | |
| 4816 | 4816 | .semver => |semver| try buffer.writer().print( |
| 4817 | 4817 | \\ .semver = .{{ |
| 4818 | 4818 | \\ .min = .{{ |