authorgravatar for mason@gamesbymason.comMason Remaley <mason@gamesbymason.com> 2026-10-12 11:19:26-07:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-15 20:13:54+02:00
log0617b16a04d0980ea728ba3516d765d098ce068e
treec18f6607bef60d734fe11fa6b8e3af108b83b847
parent35d8e6324696a829bc5052d8f6b90ca4dc233433
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

Remove trailing newline after diagnostics

resolves #37071

1 files changed, 6 insertions(+), 103 deletions(-)

lib/std/zon/parse.zig+6-103
......@@ -117,17 +117,18 @@ pub const Diagnostics = struct {
117117 errors: []const Error,
118118
119119 pub fn format(self: *const @This(), w: *std.Io.Writer) std.Io.Writer.Error!void {
120 for (self.errors) |e| {
121 try w.print("{s}:", .{self.path});
122 try w.print("{d}:{d}: error: {s}\n", .{
120 for (self.errors, 0..) |e, i| {
121 if (i > 0) try w.writeByte('\n');
122 try w.print("{s}:{d}:{d}: error: {s}", .{
123 self.path,
123124 e.loc.line + 1,
124125 e.loc.column + 1,
125126 e.msg,
126127 });
127128
128129 for (e.notes) |note| {
129 try w.print("{s}:", .{self.path});
130 try w.print("{d}:{d}: note: {s}\n", .{
130 try w.print("\n{s}:{d}:{d}: note: {s}", .{
131 self.path,
131132 note.loc.line + 1,
132133 note.loc.column + 1,
133134 note.msg,
......@@ -1395,7 +1396,6 @@ test "std.zon ast errors" {
13951396 );
13961397 try std.testing.expectFmt(
13971398 \\input.zon:1:13: error: expected ',' after initializer
1398 \\
13991399 , "{f}", .{diagnostics.fmt("input.zon")});
14001400}
14011401
......@@ -1430,7 +1430,6 @@ test "std.zon comments" {
14301430 }));
14311431 try std.testing.expectFmt(
14321432 \\input.zon:1:1: error: expected expression, found 'a document comment'
1433 \\
14341433 , "{f}", .{diagnostics.fmt("input.zon")});
14351434 }
14361435}
......@@ -1470,7 +1469,6 @@ test "std.zon fromSlice syntax error" {
14701469 );
14711470 try std.testing.expectFmt(
14721471 \\input.zon:1:3: error: expected expression, found 'EOF'
1473 \\
14741472 , "{f}", .{diagnostics.fmt("input.zon")});
14751473}
14761474
......@@ -1611,7 +1609,6 @@ test "std.zon unions" {
16111609 try std.testing.expectFmt(
16121610 \\input.zon:1:4: error: unexpected field 'z'
16131611 \\input.zon:1:4: note: supported: 'x', 'y'
1614 \\
16151612 , "{f}", .{diagnostics.fmt("input.zon")});
16161613 }
16171614
......@@ -1629,7 +1626,6 @@ test "std.zon unions" {
16291626 );
16301627 try std.testing.expectFmt(
16311628 \\input.zon:1:6: error: expected type 'void'
1632 \\
16331629 , "{f}", .{diagnostics.fmt("input.zon")});
16341630 }
16351631
......@@ -1647,7 +1643,6 @@ test "std.zon unions" {
16471643 );
16481644 try std.testing.expectFmt(
16491645 \\input.zon:1:2: error: expected union
1650 \\
16511646 , "{f}", .{diagnostics.fmt("input.zon")});
16521647 }
16531648
......@@ -1665,7 +1660,6 @@ test "std.zon unions" {
16651660 );
16661661 try std.testing.expectFmt(
16671662 \\input.zon:1:2: error: expected union
1668 \\
16691663 , "{f}", .{diagnostics.fmt("input.zon")});
16701664 }
16711665
......@@ -1680,7 +1674,6 @@ test "std.zon unions" {
16801674 }));
16811675 try std.testing.expectFmt(
16821676 \\input.zon:1:2: error: expected union
1683 \\
16841677 , "{f}", .{diagnostics.fmt("input.zon")});
16851678 }
16861679
......@@ -1696,7 +1689,6 @@ test "std.zon unions" {
16961689 try std.testing.expectFmt(
16971690 \\input.zon:1:2: error: unexpected field 'y'
16981691 \\input.zon:1:2: note: supported: 'x'
1699 \\
17001692 , "{f}", .{diagnostics.fmt("input.zon")});
17011693 }
17021694
......@@ -1711,7 +1703,6 @@ test "std.zon unions" {
17111703 }));
17121704 try std.testing.expectFmt(
17131705 \\input.zon:1:2: error: expected union
1714 \\
17151706 , "{f}", .{diagnostics.fmt("input.zon")});
17161707 }
17171708}
......@@ -1791,7 +1782,6 @@ test "std.zon structs" {
17911782 try std.testing.expectFmt(
17921783 \\input.zon:1:12: error: unexpected field 'z'
17931784 \\input.zon:1:12: note: supported: 'x', 'y'
1794 \\
17951785 , "{f}", .{diagnostics.fmt("input.zon")});
17961786 }
17971787
......@@ -1810,7 +1800,6 @@ test "std.zon structs" {
18101800 try std.testing.expectFmt(
18111801 \\input.zon:1:4: error: duplicate struct field name
18121802 \\input.zon:1:12: note: duplicate name here
1813 \\
18141803 , "{f}", .{diagnostics.fmt("input.zon")});
18151804 }
18161805
......@@ -1842,7 +1831,6 @@ test "std.zon structs" {
18421831 try std.testing.expectFmt(
18431832 \\input.zon:1:4: error: unexpected field 'x'
18441833 \\input.zon:1:4: note: none expected
1845 \\
18461834 , "{f}", .{diagnostics.fmt("input.zon")});
18471835 }
18481836
......@@ -1860,7 +1848,6 @@ test "std.zon structs" {
18601848 );
18611849 try std.testing.expectFmt(
18621850 \\input.zon:1:2: error: missing required field y
1863 \\
18641851 , "{f}", .{diagnostics.fmt("input.zon")});
18651852 }
18661853
......@@ -1900,7 +1887,6 @@ test "std.zon structs" {
19001887 try std.testing.expectError(error.ParseZon, parsed);
19011888 try std.testing.expectFmt(
19021889 \\input.zon:1:18: error: cannot initialize comptime field
1903 \\
19041890 , "{f}", .{diagnostics.fmt("input.zon")});
19051891 }
19061892
......@@ -1943,7 +1929,6 @@ test "std.zon structs" {
19431929 try std.testing.expectFmt(
19441930 \\input.zon:1:1: error: types are not available in ZON
19451931 \\input.zon:1:1: note: replace the type with '.'
1946 \\
19471932 , "{f}", .{diagnostics.fmt("input.zon")});
19481933 }
19491934
......@@ -1959,7 +1944,6 @@ test "std.zon structs" {
19591944 try std.testing.expectFmt(
19601945 \\input.zon:1:1: error: types are not available in ZON
19611946 \\input.zon:1:1: note: replace the type with '.'
1962 \\
19631947 , "{f}", .{diagnostics.fmt("input.zon")});
19641948 }
19651949
......@@ -1975,7 +1959,6 @@ test "std.zon structs" {
19751959 try std.testing.expectFmt(
19761960 \\input.zon:1:1: error: types are not available in ZON
19771961 \\input.zon:1:1: note: replace the type with '.'
1978 \\
19791962 , "{f}", .{diagnostics.fmt("input.zon")});
19801963 }
19811964
......@@ -1991,7 +1974,6 @@ test "std.zon structs" {
19911974 try std.testing.expectFmt(
19921975 \\input.zon:1:1: error: types are not available in ZON
19931976 \\input.zon:1:1: note: replace the type with '.'
1994 \\
19951977 , "{f}", .{diagnostics.fmt("input.zon")});
19961978 }
19971979
......@@ -2007,7 +1989,6 @@ test "std.zon structs" {
20071989 try std.testing.expectFmt(
20081990 \\input.zon:1:9: error: types are not available in ZON
20091991 \\input.zon:1:9: note: replace the type with '.'
2010 \\
20111992 , "{f}", .{diagnostics.fmt("input.zon")});
20121993 }
20131994 }
......@@ -2086,7 +2067,6 @@ test "std.zon tuples" {
20862067 );
20872068 try std.testing.expectFmt(
20882069 \\input.zon:1:14: error: index 2 outside of tuple length 2
2089 \\
20902070 , "{f}", .{diagnostics.fmt("input.zon")});
20912071 }
20922072
......@@ -2104,7 +2084,6 @@ test "std.zon tuples" {
21042084 );
21052085 try std.testing.expectFmt(
21062086 \\input.zon:1:2: error: missing tuple field with index 1
2107 \\
21082087 , "{f}", .{diagnostics.fmt("input.zon")});
21092088 }
21102089
......@@ -2122,7 +2101,6 @@ test "std.zon tuples" {
21222101 );
21232102 try std.testing.expectFmt(
21242103 \\input.zon:1:2: error: expected tuple
2125 \\
21262104 , "{f}", .{diagnostics.fmt("input.zon")});
21272105 }
21282106
......@@ -2140,7 +2118,6 @@ test "std.zon tuples" {
21402118 );
21412119 try std.testing.expectFmt(
21422120 \\input.zon:1:2: error: expected struct
2143 \\
21442121 , "{f}", .{diagnostics.fmt("input.zon")});
21452122 }
21462123
......@@ -2168,7 +2145,6 @@ test "std.zon tuples" {
21682145 try std.testing.expectError(error.ParseZon, parsed);
21692146 try std.testing.expectFmt(
21702147 \\input.zon:1:9: error: cannot initialize comptime field
2171 \\
21722148 , "{f}", .{diagnostics.fmt("input.zon")});
21732149 }
21742150}
......@@ -2357,7 +2333,6 @@ test "std.zon arrays and slices" {
23572333 );
23582334 try std.testing.expectFmt(
23592335 \\input.zon:1:3: error: index 0 outside of array of length 0
2360 \\
23612336 , "{f}", .{diagnostics.fmt("input.zon")});
23622337 }
23632338
......@@ -2374,7 +2349,6 @@ test "std.zon arrays and slices" {
23742349 );
23752350 try std.testing.expectFmt(
23762351 \\input.zon:1:8: error: index 1 outside of array of length 1
2377 \\
23782352 , "{f}", .{diagnostics.fmt("input.zon")});
23792353 }
23802354
......@@ -2391,7 +2365,6 @@ test "std.zon arrays and slices" {
23912365 );
23922366 try std.testing.expectFmt(
23932367 \\input.zon:1:2: error: expected 2 array elements; found 1
2394 \\
23952368 , "{f}", .{diagnostics.fmt("input.zon")});
23962369 }
23972370
......@@ -2408,7 +2381,6 @@ test "std.zon arrays and slices" {
24082381 );
24092382 try std.testing.expectFmt(
24102383 \\input.zon:1:2: error: expected 3 array elements; found 0
2411 \\
24122384 , "{f}", .{diagnostics.fmt("input.zon")});
24132385 }
24142386
......@@ -2427,7 +2399,6 @@ test "std.zon arrays and slices" {
24272399 );
24282400 try std.testing.expectFmt(
24292401 \\input.zon:1:3: error: expected type 'bool'
2430 \\
24312402 , "{f}", .{diagnostics.fmt("input.zon")});
24322403 }
24332404
......@@ -2444,7 +2415,6 @@ test "std.zon arrays and slices" {
24442415 );
24452416 try std.testing.expectFmt(
24462417 \\input.zon:1:3: error: expected type 'bool'
2447 \\
24482418 , "{f}", .{diagnostics.fmt("input.zon")});
24492419 }
24502420 }
......@@ -2464,7 +2434,6 @@ test "std.zon arrays and slices" {
24642434 );
24652435 try std.testing.expectFmt(
24662436 \\input.zon:1:1: error: expected array
2467 \\
24682437 , "{f}", .{diagnostics.fmt("input.zon")});
24692438 }
24702439
......@@ -2476,7 +2445,6 @@ test "std.zon arrays and slices" {
24762445 );
24772446 try std.testing.expectFmt(
24782447 \\input.zon:1:1: error: expected array
2479 \\
24802448 , "{f}", .{diagnostics.fmt("input.zon")});
24812449 }
24822450 }
......@@ -2489,7 +2457,6 @@ test "std.zon arrays and slices" {
24892457 );
24902458 try std.testing.expectFmt(
24912459 \\input.zon:1:3: error: pointers are not available in ZON
2492 \\
24932460 , "{f}", .{diagnostics.fmt("input.zon")});
24942461 }
24952462}
......@@ -2543,7 +2510,6 @@ test "std.zon string literal" {
25432510 );
25442511 try std.testing.expectFmt(
25452512 \\input.zon:1:1: error: expected array
2546 \\
25472513 , "{f}", .{diagnostics.fmt("input.zon")});
25482514 }
25492515
......@@ -2554,7 +2520,6 @@ test "std.zon string literal" {
25542520 );
25552521 try std.testing.expectFmt(
25562522 \\input.zon:1:1: error: expected array
2557 \\
25582523 , "{f}", .{diagnostics.fmt("input.zon")});
25592524 }
25602525 }
......@@ -2577,7 +2542,6 @@ test "std.zon string literal" {
25772542 );
25782543 try std.testing.expectFmt(
25792544 \\input.zon:1:1: error: expected array
2580 \\
25812545 , "{f}", .{diagnostics.fmt("input.zon")});
25822546 }
25832547
......@@ -2593,7 +2557,6 @@ test "std.zon string literal" {
25932557 );
25942558 try std.testing.expectFmt(
25952559 \\input.zon:1:1: error: expected array
2596 \\
25972560 , "{f}", .{diagnostics.fmt("input.zon")});
25982561 }
25992562 }
......@@ -2632,7 +2595,6 @@ test "std.zon string literal" {
26322595 );
26332596 try std.testing.expectFmt(
26342597 \\input.zon:1:1: error: expected array
2635 \\
26362598 , "{f}", .{diagnostics.fmt("input.zon")});
26372599 }
26382600
......@@ -2643,7 +2605,6 @@ test "std.zon string literal" {
26432605 );
26442606 try std.testing.expectFmt(
26452607 \\input.zon:1:1: error: expected array
2646 \\
26472608 , "{f}", .{diagnostics.fmt("input.zon")});
26482609 }
26492610 }
......@@ -2656,7 +2617,6 @@ test "std.zon string literal" {
26562617 );
26572618 try std.testing.expectFmt(
26582619 \\input.zon:1:1: error: expected string
2659 \\
26602620 , "{f}", .{diagnostics.fmt("input.zon")});
26612621 }
26622622
......@@ -2668,7 +2628,6 @@ test "std.zon string literal" {
26682628 );
26692629 try std.testing.expectFmt(
26702630 \\input.zon:1:3: error: expected type 'u8'
2671 \\
26722631 , "{f}", .{diagnostics.fmt("input.zon")});
26732632 }
26742633
......@@ -2680,7 +2639,6 @@ test "std.zon string literal" {
26802639 );
26812640 try std.testing.expectFmt(
26822641 \\input.zon:1:3: error: invalid escape character: 'a'
2683 \\
26842642 , "{f}", .{diagnostics.fmt("input.zon")});
26852643 }
26862644
......@@ -2693,7 +2651,6 @@ test "std.zon string literal" {
26932651 );
26942652 try std.testing.expectFmt(
26952653 \\input.zon:1:1: error: expected array
2696 \\
26972654 , "{f}", .{diagnostics.fmt("input.zon")});
26982655 }
26992656
......@@ -2704,7 +2661,6 @@ test "std.zon string literal" {
27042661 );
27052662 try std.testing.expectFmt(
27062663 \\input.zon:1:1: error: expected array
2707 \\
27082664 , "{f}", .{diagnostics.fmt("input.zon")});
27092665 }
27102666 }
......@@ -2723,7 +2679,6 @@ test "std.zon string literal" {
27232679 );
27242680 try std.testing.expectFmt(
27252681 \\input.zon:1:1: error: expected array
2726 \\
27272682 , "{f}", .{diagnostics.fmt("input.zon")});
27282683 }
27292684
......@@ -2739,7 +2694,6 @@ test "std.zon string literal" {
27392694 );
27402695 try std.testing.expectFmt(
27412696 \\input.zon:1:1: error: expected array
2742 \\
27432697 , "{f}", .{diagnostics.fmt("input.zon")});
27442698 }
27452699 }
......@@ -2843,7 +2797,6 @@ test "std.zon enum literals" {
28432797 try std.testing.expectFmt(
28442798 \\input.zon:1:2: error: unexpected enum literal 'qux'
28452799 \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"'
2846 \\
28472800 , "{f}", .{diagnostics.fmt("input.zon")});
28482801 }
28492802
......@@ -2861,7 +2814,6 @@ test "std.zon enum literals" {
28612814 try std.testing.expectFmt(
28622815 \\input.zon:1:2: error: unexpected enum literal 'foobarbaz'
28632816 \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"'
2864 \\
28652817 , "{f}", .{diagnostics.fmt("input.zon")});
28662818 }
28672819
......@@ -2878,7 +2830,6 @@ test "std.zon enum literals" {
28782830 );
28792831 try std.testing.expectFmt(
28802832 \\input.zon:1:1: error: expected enum literal
2881 \\
28822833 , "{f}", .{diagnostics.fmt("input.zon")});
28832834 }
28842835
......@@ -2895,7 +2846,6 @@ test "std.zon enum literals" {
28952846 );
28962847 try std.testing.expectFmt(
28972848 \\input.zon:1:2: error: identifier cannot contain null bytes
2898 \\
28992849 , "{f}", .{diagnostics.fmt("input.zon")});
29002850 }
29012851}
......@@ -2936,7 +2886,6 @@ test "std.zon parse bool" {
29362886 \\input.zon:1:2: error: invalid expression
29372887 \\input.zon:1:2: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan'
29382888 \\input.zon:1:2: note: precede identifier with '.' for an enum literal
2939 \\
29402889 , "{f}", .{diagnostics.fmt("input.zon")});
29412890 }
29422891 {
......@@ -2948,7 +2897,6 @@ test "std.zon parse bool" {
29482897 }));
29492898 try std.testing.expectFmt(
29502899 \\input.zon:1:1: error: expected type 'bool'
2951 \\
29522900 , "{f}", .{diagnostics.fmt("input.zon")});
29532901 }
29542902}
......@@ -3093,7 +3041,6 @@ test "std.zon parse int" {
30933041 }));
30943042 try std.testing.expectFmt(
30953043 \\input.zon:1:1: error: type 'i66' cannot represent value
3096 \\
30973044 , "{f}", .{diagnostics.fmt("input.zon")});
30983045 }
30993046 {
......@@ -3105,7 +3052,6 @@ test "std.zon parse int" {
31053052 }));
31063053 try std.testing.expectFmt(
31073054 \\input.zon:1:1: error: type 'i66' cannot represent value
3108 \\
31093055 , "{f}", .{diagnostics.fmt("input.zon")});
31103056 }
31113057
......@@ -3227,7 +3173,6 @@ test "std.zon parse int" {
32273173 }));
32283174 try std.testing.expectFmt(
32293175 \\input.zon:1:3: error: invalid digit 'a' for decimal base
3230 \\
32313176 , "{f}", .{diagnostics.fmt("input.zon")});
32323177 }
32333178
......@@ -3241,7 +3186,6 @@ test "std.zon parse int" {
32413186 }));
32423187 try std.testing.expectFmt(
32433188 \\input.zon:1:1: error: expected type 'u8'
3244 \\
32453189 , "{f}", .{diagnostics.fmt("input.zon")});
32463190 }
32473191
......@@ -3255,7 +3199,6 @@ test "std.zon parse int" {
32553199 }));
32563200 try std.testing.expectFmt(
32573201 \\input.zon:1:1: error: type 'u8' cannot represent value
3258 \\
32593202 , "{f}", .{diagnostics.fmt("input.zon")});
32603203 }
32613204
......@@ -3269,7 +3212,6 @@ test "std.zon parse int" {
32693212 }));
32703213 try std.testing.expectFmt(
32713214 \\input.zon:1:1: error: type 'i8' cannot represent value
3272 \\
32733215 , "{f}", .{diagnostics.fmt("input.zon")});
32743216 }
32753217
......@@ -3283,7 +3225,6 @@ test "std.zon parse int" {
32833225 }));
32843226 try std.testing.expectFmt(
32853227 \\input.zon:1:1: error: type 'u8' cannot represent value
3286 \\
32873228 , "{f}", .{diagnostics.fmt("input.zon")});
32883229 }
32893230
......@@ -3297,7 +3238,6 @@ test "std.zon parse int" {
32973238 }));
32983239 try std.testing.expectFmt(
32993240 \\input.zon:1:1: error: type 'u8' cannot represent value
3300 \\
33013241 , "{f}", .{diagnostics.fmt("input.zon")});
33023242 }
33033243
......@@ -3311,7 +3251,6 @@ test "std.zon parse int" {
33113251 }));
33123252 try std.testing.expectFmt(
33133253 \\input.zon:1:1: error: type 'u8' cannot represent value
3314 \\
33153254 , "{f}", .{diagnostics.fmt("input.zon")});
33163255 }
33173256
......@@ -3327,7 +3266,6 @@ test "std.zon parse int" {
33273266 \\input.zon:1:2: error: integer literal '-0' is ambiguous
33283267 \\input.zon:1:2: note: use '0' for an integer zero
33293268 \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero
3330 \\
33313269 , "{f}", .{diagnostics.fmt("input.zon")});
33323270 }
33333271
......@@ -3343,7 +3281,6 @@ test "std.zon parse int" {
33433281 \\input.zon:1:2: error: integer literal '-0' is ambiguous
33443282 \\input.zon:1:2: note: use '0' for an integer zero
33453283 \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero
3346 \\
33473284 , "{f}", .{diagnostics.fmt("input.zon")});
33483285 }
33493286
......@@ -3373,7 +3310,6 @@ test "std.zon parse int" {
33733310 }));
33743311 try std.testing.expectFmt(
33753312 \\input.zon:1:1: error: expected number or 'inf' after '-'
3376 \\
33773313 , "{f}", .{diagnostics.fmt("input.zon")});
33783314 }
33793315
......@@ -3389,7 +3325,6 @@ test "std.zon parse int" {
33893325 );
33903326 try std.testing.expectFmt(
33913327 \\input.zon:1:1: error: expected number or 'inf' after '-'
3392 \\
33933328 , "{f}", .{diagnostics.fmt("input.zon")});
33943329 }
33953330
......@@ -3403,7 +3338,6 @@ test "std.zon parse int" {
34033338 }));
34043339 try std.testing.expectFmt(
34053340 \\input.zon:1:3: error: invalid digit 'g' for hex base
3406 \\
34073341 , "{f}", .{diagnostics.fmt("input.zon")});
34083342 }
34093343
......@@ -3418,7 +3352,6 @@ test "std.zon parse int" {
34183352 try std.testing.expectFmt(
34193353 \\input.zon:1:1: error: number '0123' has leading zero
34203354 \\input.zon:1:1: note: use '0o' prefix for octal literals
3421 \\
34223355 , "{f}", .{diagnostics.fmt("input.zon")});
34233356 }
34243357}
......@@ -3439,7 +3372,6 @@ test "std.zon negative char" {
34393372 }));
34403373 try std.testing.expectFmt(
34413374 \\input.zon:1:1: error: expected number or 'inf' after '-'
3442 \\
34433375 , "{f}", .{diagnostics.fmt("input.zon")});
34443376 }
34453377 {
......@@ -3451,7 +3383,6 @@ test "std.zon negative char" {
34513383 }));
34523384 try std.testing.expectFmt(
34533385 \\input.zon:1:1: error: expected number or 'inf' after '-'
3454 \\
34553386 , "{f}", .{diagnostics.fmt("input.zon")});
34563387 }
34573388}
......@@ -3639,7 +3570,6 @@ test "std.zon parse float" {
36393570 }));
36403571 try std.testing.expectFmt(
36413572 \\input.zon:1:1: error: expected number or 'inf' after '-'
3642 \\
36433573 , "{f}", .{diagnostics.fmt("input.zon")});
36443574 }
36453575
......@@ -3653,7 +3583,6 @@ test "std.zon parse float" {
36533583 }));
36543584 try std.testing.expectFmt(
36553585 \\input.zon:1:1: error: expected type 'i8'
3656 \\
36573586 , "{f}", .{diagnostics.fmt("input.zon")});
36583587 }
36593588
......@@ -3667,7 +3596,6 @@ test "std.zon parse float" {
36673596 }));
36683597 try std.testing.expectFmt(
36693598 \\input.zon:1:1: error: expected type 'i8'
3670 \\
36713599 , "{f}", .{diagnostics.fmt("input.zon")});
36723600 }
36733601
......@@ -3681,7 +3609,6 @@ test "std.zon parse float" {
36813609 }));
36823610 try std.testing.expectFmt(
36833611 \\input.zon:1:1: error: expected type 'i8'
3684 \\
36853612 , "{f}", .{diagnostics.fmt("input.zon")});
36863613 }
36873614
......@@ -3695,7 +3622,6 @@ test "std.zon parse float" {
36953622 }));
36963623 try std.testing.expectFmt(
36973624 \\input.zon:1:1: error: expected type 'i8'
3698 \\
36993625 , "{f}", .{diagnostics.fmt("input.zon")});
37003626 }
37013627
......@@ -3711,7 +3637,6 @@ test "std.zon parse float" {
37113637 \\input.zon:1:1: error: invalid expression
37123638 \\input.zon:1:1: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan'
37133639 \\input.zon:1:1: note: precede identifier with '.' for an enum literal
3714 \\
37153640 , "{f}", .{diagnostics.fmt("input.zon")});
37163641 }
37173642
......@@ -3724,7 +3649,6 @@ test "std.zon parse float" {
37243649 }));
37253650 try std.testing.expectFmt(
37263651 \\input.zon:1:1: error: expected number or 'inf' after '-'
3727 \\
37283652 , "{f}", .{diagnostics.fmt("input.zon")});
37293653 }
37303654
......@@ -3741,7 +3665,6 @@ test "std.zon parse float" {
37413665 );
37423666 try std.testing.expectFmt(
37433667 \\input.zon:1:1: error: expected type 'f32'
3744 \\
37453668 , "{f}", .{diagnostics.fmt("input.zon")});
37463669 }
37473670}
......@@ -3983,7 +3906,6 @@ test "std.zon vector" {
39833906 );
39843907 try std.testing.expectFmt(
39853908 \\input.zon:1:2: error: expected 2 array elements; found 1
3986 \\
39873909 , "{f}", .{diagnostics.fmt("input.zon")});
39883910 }
39893911
......@@ -4000,7 +3922,6 @@ test "std.zon vector" {
40003922 );
40013923 try std.testing.expectFmt(
40023924 \\input.zon:1:13: error: index 2 outside of array of length 2
4003 \\
40043925 , "{f}", .{diagnostics.fmt("input.zon")});
40053926 }
40063927
......@@ -4017,7 +3938,6 @@ test "std.zon vector" {
40173938 );
40183939 try std.testing.expectFmt(
40193940 \\input.zon:1:8: error: expected type 'f32'
4020 \\
40213941 , "{f}", .{diagnostics.fmt("input.zon")});
40223942 }
40233943
......@@ -4034,7 +3954,6 @@ test "std.zon vector" {
40343954 );
40353955 try std.testing.expectFmt(
40363956 \\input.zon:1:1: error: expected type '@Vector(3, u8)'
4037 \\
40383957 , "{f}", .{diagnostics.fmt("input.zon")});
40393958 }
40403959
......@@ -4051,7 +3970,6 @@ test "std.zon vector" {
40513970 );
40523971 try std.testing.expectFmt(
40533972 \\input.zon:1:6: error: expected type 'u8'
4054 \\
40553973 , "{f}", .{diagnostics.fmt("input.zon")});
40563974 }
40573975}
......@@ -4245,7 +4163,6 @@ test "std.zon add pointers" {
42454163 );
42464164 try std.testing.expectFmt(
42474165 \\input.zon:1:1: error: expected type '?u8'
4248 \\
42494166 , "{f}", .{diagnostics.fmt("input.zon")});
42504167 }
42514168
......@@ -4261,7 +4178,6 @@ test "std.zon add pointers" {
42614178 );
42624179 try std.testing.expectFmt(
42634180 \\input.zon:1:1: error: expected type '?f32'
4264 \\
42654181 , "{f}", .{diagnostics.fmt("input.zon")});
42664182 }
42674183
......@@ -4277,7 +4193,6 @@ test "std.zon add pointers" {
42774193 );
42784194 try std.testing.expectFmt(
42794195 \\input.zon:1:1: error: expected type '?@Vector(3, u8)'
4280 \\
42814196 , "{f}", .{diagnostics.fmt("input.zon")});
42824197 }
42834198
......@@ -4293,7 +4208,6 @@ test "std.zon add pointers" {
42934208 );
42944209 try std.testing.expectFmt(
42954210 \\input.zon:1:1: error: expected type '?bool'
4296 \\
42974211 , "{f}", .{diagnostics.fmt("input.zon")});
42984212 }
42994213
......@@ -4309,7 +4223,6 @@ test "std.zon add pointers" {
43094223 );
43104224 try std.testing.expectFmt(
43114225 \\input.zon:1:1: error: expected optional struct
4312 \\
43134226 , "{f}", .{diagnostics.fmt("input.zon")});
43144227 }
43154228
......@@ -4325,7 +4238,6 @@ test "std.zon add pointers" {
43254238 );
43264239 try std.testing.expectFmt(
43274240 \\input.zon:1:1: error: expected optional tuple
4328 \\
43294241 , "{f}", .{diagnostics.fmt("input.zon")});
43304242 }
43314243
......@@ -4341,7 +4253,6 @@ test "std.zon add pointers" {
43414253 );
43424254 try std.testing.expectFmt(
43434255 \\input.zon:1:1: error: expected optional union
4344 \\
43454256 , "{f}", .{diagnostics.fmt("input.zon")});
43464257 }
43474258
......@@ -4357,7 +4268,6 @@ test "std.zon add pointers" {
43574268 );
43584269 try std.testing.expectFmt(
43594270 \\input.zon:1:1: error: expected optional array
4360 \\
43614271 , "{f}", .{diagnostics.fmt("input.zon")});
43624272 }
43634273
......@@ -4373,7 +4283,6 @@ test "std.zon add pointers" {
43734283 );
43744284 try std.testing.expectFmt(
43754285 \\input.zon:1:1: error: expected optional array
4376 \\
43774286 , "{f}", .{diagnostics.fmt("input.zon")});
43784287 }
43794288
......@@ -4389,7 +4298,6 @@ test "std.zon add pointers" {
43894298 );
43904299 try std.testing.expectFmt(
43914300 \\input.zon:1:1: error: expected optional array
4392 \\
43934301 , "{f}", .{diagnostics.fmt("input.zon")});
43944302 }
43954303
......@@ -4405,7 +4313,6 @@ test "std.zon add pointers" {
44054313 );
44064314 try std.testing.expectFmt(
44074315 \\input.zon:1:1: error: expected optional array
4408 \\
44094316 , "{f}", .{diagnostics.fmt("input.zon")});
44104317 }
44114318
......@@ -4421,7 +4328,6 @@ test "std.zon add pointers" {
44214328 );
44224329 try std.testing.expectFmt(
44234330 \\input.zon:1:1: error: expected optional string
4424 \\
44254331 , "{f}", .{diagnostics.fmt("input.zon")});
44264332 }
44274333
......@@ -4437,7 +4343,6 @@ test "std.zon add pointers" {
44374343 );
44384344 try std.testing.expectFmt(
44394345 \\input.zon:1:1: error: expected optional enum literal
4440 \\
44414346 , "{f}", .{diagnostics.fmt("input.zon")});
44424347 }
44434348}
......@@ -4698,7 +4603,6 @@ test "std.zon update optionals" {
46984603 }));
46994604 try std.testing.expectFmt(
47004605 \\input.zon:1:12: error: missing required field qux
4701 \\
47024606 , "{f}", .{diagnostics.fmt("input.zon")});
47034607 }
47044608
......@@ -4826,7 +4730,6 @@ test "std.zon update unions" {
48264730 }));
48274731 try std.testing.expectFmt(
48284732 \\input.zon:1:12: error: missing required field qux
4829 \\
48304733 , "{f}", .{diagnostics.fmt("input.zon")});
48314734 }
48324735