| ... | @@ -2575,6 +2575,10 @@ pub fn stringify( | ... | @@ -2575,6 +2575,10 @@ pub fn stringify( |
| 2575 | else => @compileError("Unable to stringify type '" ++ @typeName(T) ++ "'"), | 2575 | else => @compileError("Unable to stringify type '" ++ @typeName(T) ++ "'"), |
| 2576 | }, | 2576 | }, |
| 2577 | .Array => return stringify(&value, options, out_stream), | 2577 | .Array => return stringify(&value, options, out_stream), |
| | 2578 | .Vector => |info| { |
| | 2579 | const array: [info.len]info.child = value; |
| | 2580 | return stringify(&array, options, out_stream); |
| | 2581 | }, |
| 2578 | else => @compileError("Unable to stringify type '" ++ @typeName(T) ++ "'"), | 2582 | else => @compileError("Unable to stringify type '" ++ @typeName(T) ++ "'"), |
| 2579 | } | 2583 | } |
| 2580 | unreachable; | 2584 | unreachable; |
| ... | @@ -2762,3 +2766,8 @@ test "stringify struct with custom stringifier" { | ... | @@ -2762,3 +2766,8 @@ test "stringify struct with custom stringifier" { |
| 2762 | } | 2766 | } |
| 2763 | }{ .foo = 42 }, StringifyOptions{}); | 2767 | }{ .foo = 42 }, StringifyOptions{}); |
| 2764 | } | 2768 | } |
| | 2769 | |
| | 2770 | test "stringify vector" { |
| | 2771 | try teststringify("[1,1]", @splat(2, @as(u32, 1)), StringifyOptions{}); |
| | 2772 | } |
| | 2773 | |