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 15:04:40+02:00
log38dd6a68b702f7b34bf888a047c7b7cb93a1ae79
tree1cfdd31d7d5475c88ab3a013a3e76735d2f60d0a
parent3f3f3f57f7f3f03d049eb753230e11f7e3d059d7

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,
......@@ -1394,7 +1395,6 @@ test "std.zon ast errors" {
13941395 );
13951396 try std.testing.expectFmt(
13961397 \\input.zon:1:13: error: expected ',' after initializer
1397 \\
13981398 , "{f}", .{diagnostics.fmt("input.zon")});
13991399}
14001400
......@@ -1429,7 +1429,6 @@ test "std.zon comments" {
14291429 }));
14301430 try std.testing.expectFmt(
14311431 \\input.zon:1:1: error: expected expression, found 'a document comment'
1432 \\
14331432 , "{f}", .{diagnostics.fmt("input.zon")});
14341433 }
14351434}
......@@ -1469,7 +1468,6 @@ test "std.zon fromSlice syntax error" {
14691468 );
14701469 try std.testing.expectFmt(
14711470 \\input.zon:1:3: error: expected expression, found 'EOF'
1472 \\
14731471 , "{f}", .{diagnostics.fmt("input.zon")});
14741472}
14751473
......@@ -1610,7 +1608,6 @@ test "std.zon unions" {
16101608 try std.testing.expectFmt(
16111609 \\input.zon:1:4: error: unexpected field 'z'
16121610 \\input.zon:1:4: note: supported: 'x', 'y'
1613 \\
16141611 , "{f}", .{diagnostics.fmt("input.zon")});
16151612 }
16161613
......@@ -1628,7 +1625,6 @@ test "std.zon unions" {
16281625 );
16291626 try std.testing.expectFmt(
16301627 \\input.zon:1:6: error: expected type 'void'
1631 \\
16321628 , "{f}", .{diagnostics.fmt("input.zon")});
16331629 }
16341630
......@@ -1646,7 +1642,6 @@ test "std.zon unions" {
16461642 );
16471643 try std.testing.expectFmt(
16481644 \\input.zon:1:2: error: expected union
1649 \\
16501645 , "{f}", .{diagnostics.fmt("input.zon")});
16511646 }
16521647
......@@ -1664,7 +1659,6 @@ test "std.zon unions" {
16641659 );
16651660 try std.testing.expectFmt(
16661661 \\input.zon:1:2: error: expected union
1667 \\
16681662 , "{f}", .{diagnostics.fmt("input.zon")});
16691663 }
16701664
......@@ -1679,7 +1673,6 @@ test "std.zon unions" {
16791673 }));
16801674 try std.testing.expectFmt(
16811675 \\input.zon:1:2: error: expected union
1682 \\
16831676 , "{f}", .{diagnostics.fmt("input.zon")});
16841677 }
16851678
......@@ -1695,7 +1688,6 @@ test "std.zon unions" {
16951688 try std.testing.expectFmt(
16961689 \\input.zon:1:2: error: unexpected field 'y'
16971690 \\input.zon:1:2: note: supported: 'x'
1698 \\
16991691 , "{f}", .{diagnostics.fmt("input.zon")});
17001692 }
17011693
......@@ -1710,7 +1702,6 @@ test "std.zon unions" {
17101702 }));
17111703 try std.testing.expectFmt(
17121704 \\input.zon:1:2: error: expected union
1713 \\
17141705 , "{f}", .{diagnostics.fmt("input.zon")});
17151706 }
17161707}
......@@ -1790,7 +1781,6 @@ test "std.zon structs" {
17901781 try std.testing.expectFmt(
17911782 \\input.zon:1:12: error: unexpected field 'z'
17921783 \\input.zon:1:12: note: supported: 'x', 'y'
1793 \\
17941784 , "{f}", .{diagnostics.fmt("input.zon")});
17951785 }
17961786
......@@ -1809,7 +1799,6 @@ test "std.zon structs" {
18091799 try std.testing.expectFmt(
18101800 \\input.zon:1:4: error: duplicate struct field name
18111801 \\input.zon:1:12: note: duplicate name here
1812 \\
18131802 , "{f}", .{diagnostics.fmt("input.zon")});
18141803 }
18151804
......@@ -1841,7 +1830,6 @@ test "std.zon structs" {
18411830 try std.testing.expectFmt(
18421831 \\input.zon:1:4: error: unexpected field 'x'
18431832 \\input.zon:1:4: note: none expected
1844 \\
18451833 , "{f}", .{diagnostics.fmt("input.zon")});
18461834 }
18471835
......@@ -1859,7 +1847,6 @@ test "std.zon structs" {
18591847 );
18601848 try std.testing.expectFmt(
18611849 \\input.zon:1:2: error: missing required field y
1862 \\
18631850 , "{f}", .{diagnostics.fmt("input.zon")});
18641851 }
18651852
......@@ -1899,7 +1886,6 @@ test "std.zon structs" {
18991886 try std.testing.expectError(error.ParseZon, parsed);
19001887 try std.testing.expectFmt(
19011888 \\input.zon:1:18: error: cannot initialize comptime field
1902 \\
19031889 , "{f}", .{diagnostics.fmt("input.zon")});
19041890 }
19051891
......@@ -1942,7 +1928,6 @@ test "std.zon structs" {
19421928 try std.testing.expectFmt(
19431929 \\input.zon:1:1: error: types are not available in ZON
19441930 \\input.zon:1:1: note: replace the type with '.'
1945 \\
19461931 , "{f}", .{diagnostics.fmt("input.zon")});
19471932 }
19481933
......@@ -1958,7 +1943,6 @@ test "std.zon structs" {
19581943 try std.testing.expectFmt(
19591944 \\input.zon:1:1: error: types are not available in ZON
19601945 \\input.zon:1:1: note: replace the type with '.'
1961 \\
19621946 , "{f}", .{diagnostics.fmt("input.zon")});
19631947 }
19641948
......@@ -1974,7 +1958,6 @@ test "std.zon structs" {
19741958 try std.testing.expectFmt(
19751959 \\input.zon:1:1: error: types are not available in ZON
19761960 \\input.zon:1:1: note: replace the type with '.'
1977 \\
19781961 , "{f}", .{diagnostics.fmt("input.zon")});
19791962 }
19801963
......@@ -1990,7 +1973,6 @@ test "std.zon structs" {
19901973 try std.testing.expectFmt(
19911974 \\input.zon:1:1: error: types are not available in ZON
19921975 \\input.zon:1:1: note: replace the type with '.'
1993 \\
19941976 , "{f}", .{diagnostics.fmt("input.zon")});
19951977 }
19961978
......@@ -2006,7 +1988,6 @@ test "std.zon structs" {
20061988 try std.testing.expectFmt(
20071989 \\input.zon:1:9: error: types are not available in ZON
20081990 \\input.zon:1:9: note: replace the type with '.'
2009 \\
20101991 , "{f}", .{diagnostics.fmt("input.zon")});
20111992 }
20121993 }
......@@ -2085,7 +2066,6 @@ test "std.zon tuples" {
20852066 );
20862067 try std.testing.expectFmt(
20872068 \\input.zon:1:14: error: index 2 outside of tuple length 2
2088 \\
20892069 , "{f}", .{diagnostics.fmt("input.zon")});
20902070 }
20912071
......@@ -2103,7 +2083,6 @@ test "std.zon tuples" {
21032083 );
21042084 try std.testing.expectFmt(
21052085 \\input.zon:1:2: error: missing tuple field with index 1
2106 \\
21072086 , "{f}", .{diagnostics.fmt("input.zon")});
21082087 }
21092088
......@@ -2121,7 +2100,6 @@ test "std.zon tuples" {
21212100 );
21222101 try std.testing.expectFmt(
21232102 \\input.zon:1:2: error: expected tuple
2124 \\
21252103 , "{f}", .{diagnostics.fmt("input.zon")});
21262104 }
21272105
......@@ -2139,7 +2117,6 @@ test "std.zon tuples" {
21392117 );
21402118 try std.testing.expectFmt(
21412119 \\input.zon:1:2: error: expected struct
2142 \\
21432120 , "{f}", .{diagnostics.fmt("input.zon")});
21442121 }
21452122
......@@ -2167,7 +2144,6 @@ test "std.zon tuples" {
21672144 try std.testing.expectError(error.ParseZon, parsed);
21682145 try std.testing.expectFmt(
21692146 \\input.zon:1:9: error: cannot initialize comptime field
2170 \\
21712147 , "{f}", .{diagnostics.fmt("input.zon")});
21722148 }
21732149}
......@@ -2356,7 +2332,6 @@ test "std.zon arrays and slices" {
23562332 );
23572333 try std.testing.expectFmt(
23582334 \\input.zon:1:3: error: index 0 outside of array of length 0
2359 \\
23602335 , "{f}", .{diagnostics.fmt("input.zon")});
23612336 }
23622337
......@@ -2373,7 +2348,6 @@ test "std.zon arrays and slices" {
23732348 );
23742349 try std.testing.expectFmt(
23752350 \\input.zon:1:8: error: index 1 outside of array of length 1
2376 \\
23772351 , "{f}", .{diagnostics.fmt("input.zon")});
23782352 }
23792353
......@@ -2390,7 +2364,6 @@ test "std.zon arrays and slices" {
23902364 );
23912365 try std.testing.expectFmt(
23922366 \\input.zon:1:2: error: expected 2 array elements; found 1
2393 \\
23942367 , "{f}", .{diagnostics.fmt("input.zon")});
23952368 }
23962369
......@@ -2407,7 +2380,6 @@ test "std.zon arrays and slices" {
24072380 );
24082381 try std.testing.expectFmt(
24092382 \\input.zon:1:2: error: expected 3 array elements; found 0
2410 \\
24112383 , "{f}", .{diagnostics.fmt("input.zon")});
24122384 }
24132385
......@@ -2426,7 +2398,6 @@ test "std.zon arrays and slices" {
24262398 );
24272399 try std.testing.expectFmt(
24282400 \\input.zon:1:3: error: expected type 'bool'
2429 \\
24302401 , "{f}", .{diagnostics.fmt("input.zon")});
24312402 }
24322403
......@@ -2443,7 +2414,6 @@ test "std.zon arrays and slices" {
24432414 );
24442415 try std.testing.expectFmt(
24452416 \\input.zon:1:3: error: expected type 'bool'
2446 \\
24472417 , "{f}", .{diagnostics.fmt("input.zon")});
24482418 }
24492419 }
......@@ -2463,7 +2433,6 @@ test "std.zon arrays and slices" {
24632433 );
24642434 try std.testing.expectFmt(
24652435 \\input.zon:1:1: error: expected array
2466 \\
24672436 , "{f}", .{diagnostics.fmt("input.zon")});
24682437 }
24692438
......@@ -2475,7 +2444,6 @@ test "std.zon arrays and slices" {
24752444 );
24762445 try std.testing.expectFmt(
24772446 \\input.zon:1:1: error: expected array
2478 \\
24792447 , "{f}", .{diagnostics.fmt("input.zon")});
24802448 }
24812449 }
......@@ -2488,7 +2456,6 @@ test "std.zon arrays and slices" {
24882456 );
24892457 try std.testing.expectFmt(
24902458 \\input.zon:1:3: error: pointers are not available in ZON
2491 \\
24922459 , "{f}", .{diagnostics.fmt("input.zon")});
24932460 }
24942461}
......@@ -2542,7 +2509,6 @@ test "std.zon string literal" {
25422509 );
25432510 try std.testing.expectFmt(
25442511 \\input.zon:1:1: error: expected array
2545 \\
25462512 , "{f}", .{diagnostics.fmt("input.zon")});
25472513 }
25482514
......@@ -2553,7 +2519,6 @@ test "std.zon string literal" {
25532519 );
25542520 try std.testing.expectFmt(
25552521 \\input.zon:1:1: error: expected array
2556 \\
25572522 , "{f}", .{diagnostics.fmt("input.zon")});
25582523 }
25592524 }
......@@ -2576,7 +2541,6 @@ test "std.zon string literal" {
25762541 );
25772542 try std.testing.expectFmt(
25782543 \\input.zon:1:1: error: expected array
2579 \\
25802544 , "{f}", .{diagnostics.fmt("input.zon")});
25812545 }
25822546
......@@ -2592,7 +2556,6 @@ test "std.zon string literal" {
25922556 );
25932557 try std.testing.expectFmt(
25942558 \\input.zon:1:1: error: expected array
2595 \\
25962559 , "{f}", .{diagnostics.fmt("input.zon")});
25972560 }
25982561 }
......@@ -2631,7 +2594,6 @@ test "std.zon string literal" {
26312594 );
26322595 try std.testing.expectFmt(
26332596 \\input.zon:1:1: error: expected array
2634 \\
26352597 , "{f}", .{diagnostics.fmt("input.zon")});
26362598 }
26372599
......@@ -2642,7 +2604,6 @@ test "std.zon string literal" {
26422604 );
26432605 try std.testing.expectFmt(
26442606 \\input.zon:1:1: error: expected array
2645 \\
26462607 , "{f}", .{diagnostics.fmt("input.zon")});
26472608 }
26482609 }
......@@ -2655,7 +2616,6 @@ test "std.zon string literal" {
26552616 );
26562617 try std.testing.expectFmt(
26572618 \\input.zon:1:1: error: expected string
2658 \\
26592619 , "{f}", .{diagnostics.fmt("input.zon")});
26602620 }
26612621
......@@ -2667,7 +2627,6 @@ test "std.zon string literal" {
26672627 );
26682628 try std.testing.expectFmt(
26692629 \\input.zon:1:3: error: expected type 'u8'
2670 \\
26712630 , "{f}", .{diagnostics.fmt("input.zon")});
26722631 }
26732632
......@@ -2679,7 +2638,6 @@ test "std.zon string literal" {
26792638 );
26802639 try std.testing.expectFmt(
26812640 \\input.zon:1:3: error: invalid escape character: 'a'
2682 \\
26832641 , "{f}", .{diagnostics.fmt("input.zon")});
26842642 }
26852643
......@@ -2692,7 +2650,6 @@ test "std.zon string literal" {
26922650 );
26932651 try std.testing.expectFmt(
26942652 \\input.zon:1:1: error: expected array
2695 \\
26962653 , "{f}", .{diagnostics.fmt("input.zon")});
26972654 }
26982655
......@@ -2703,7 +2660,6 @@ test "std.zon string literal" {
27032660 );
27042661 try std.testing.expectFmt(
27052662 \\input.zon:1:1: error: expected array
2706 \\
27072663 , "{f}", .{diagnostics.fmt("input.zon")});
27082664 }
27092665 }
......@@ -2722,7 +2678,6 @@ test "std.zon string literal" {
27222678 );
27232679 try std.testing.expectFmt(
27242680 \\input.zon:1:1: error: expected array
2725 \\
27262681 , "{f}", .{diagnostics.fmt("input.zon")});
27272682 }
27282683
......@@ -2738,7 +2693,6 @@ test "std.zon string literal" {
27382693 );
27392694 try std.testing.expectFmt(
27402695 \\input.zon:1:1: error: expected array
2741 \\
27422696 , "{f}", .{diagnostics.fmt("input.zon")});
27432697 }
27442698 }
......@@ -2842,7 +2796,6 @@ test "std.zon enum literals" {
28422796 try std.testing.expectFmt(
28432797 \\input.zon:1:2: error: unexpected enum literal 'qux'
28442798 \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"'
2845 \\
28462799 , "{f}", .{diagnostics.fmt("input.zon")});
28472800 }
28482801
......@@ -2860,7 +2813,6 @@ test "std.zon enum literals" {
28602813 try std.testing.expectFmt(
28612814 \\input.zon:1:2: error: unexpected enum literal 'foobarbaz'
28622815 \\input.zon:1:2: note: supported: 'foo', 'bar', 'baz', '@"ab\nc"'
2863 \\
28642816 , "{f}", .{diagnostics.fmt("input.zon")});
28652817 }
28662818
......@@ -2877,7 +2829,6 @@ test "std.zon enum literals" {
28772829 );
28782830 try std.testing.expectFmt(
28792831 \\input.zon:1:1: error: expected enum literal
2880 \\
28812832 , "{f}", .{diagnostics.fmt("input.zon")});
28822833 }
28832834
......@@ -2894,7 +2845,6 @@ test "std.zon enum literals" {
28942845 );
28952846 try std.testing.expectFmt(
28962847 \\input.zon:1:2: error: identifier cannot contain null bytes
2897 \\
28982848 , "{f}", .{diagnostics.fmt("input.zon")});
28992849 }
29002850}
......@@ -2935,7 +2885,6 @@ test "std.zon parse bool" {
29352885 \\input.zon:1:2: error: invalid expression
29362886 \\input.zon:1:2: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan'
29372887 \\input.zon:1:2: note: precede identifier with '.' for an enum literal
2938 \\
29392888 , "{f}", .{diagnostics.fmt("input.zon")});
29402889 }
29412890 {
......@@ -2947,7 +2896,6 @@ test "std.zon parse bool" {
29472896 }));
29482897 try std.testing.expectFmt(
29492898 \\input.zon:1:1: error: expected type 'bool'
2950 \\
29512899 , "{f}", .{diagnostics.fmt("input.zon")});
29522900 }
29532901}
......@@ -3092,7 +3040,6 @@ test "std.zon parse int" {
30923040 }));
30933041 try std.testing.expectFmt(
30943042 \\input.zon:1:1: error: type 'i66' cannot represent value
3095 \\
30963043 , "{f}", .{diagnostics.fmt("input.zon")});
30973044 }
30983045 {
......@@ -3104,7 +3051,6 @@ test "std.zon parse int" {
31043051 }));
31053052 try std.testing.expectFmt(
31063053 \\input.zon:1:1: error: type 'i66' cannot represent value
3107 \\
31083054 , "{f}", .{diagnostics.fmt("input.zon")});
31093055 }
31103056
......@@ -3226,7 +3172,6 @@ test "std.zon parse int" {
32263172 }));
32273173 try std.testing.expectFmt(
32283174 \\input.zon:1:3: error: invalid digit 'a' for decimal base
3229 \\
32303175 , "{f}", .{diagnostics.fmt("input.zon")});
32313176 }
32323177
......@@ -3240,7 +3185,6 @@ test "std.zon parse int" {
32403185 }));
32413186 try std.testing.expectFmt(
32423187 \\input.zon:1:1: error: expected type 'u8'
3243 \\
32443188 , "{f}", .{diagnostics.fmt("input.zon")});
32453189 }
32463190
......@@ -3254,7 +3198,6 @@ test "std.zon parse int" {
32543198 }));
32553199 try std.testing.expectFmt(
32563200 \\input.zon:1:1: error: type 'u8' cannot represent value
3257 \\
32583201 , "{f}", .{diagnostics.fmt("input.zon")});
32593202 }
32603203
......@@ -3268,7 +3211,6 @@ test "std.zon parse int" {
32683211 }));
32693212 try std.testing.expectFmt(
32703213 \\input.zon:1:1: error: type 'i8' cannot represent value
3271 \\
32723214 , "{f}", .{diagnostics.fmt("input.zon")});
32733215 }
32743216
......@@ -3282,7 +3224,6 @@ test "std.zon parse int" {
32823224 }));
32833225 try std.testing.expectFmt(
32843226 \\input.zon:1:1: error: type 'u8' cannot represent value
3285 \\
32863227 , "{f}", .{diagnostics.fmt("input.zon")});
32873228 }
32883229
......@@ -3296,7 +3237,6 @@ test "std.zon parse int" {
32963237 }));
32973238 try std.testing.expectFmt(
32983239 \\input.zon:1:1: error: type 'u8' cannot represent value
3299 \\
33003240 , "{f}", .{diagnostics.fmt("input.zon")});
33013241 }
33023242
......@@ -3310,7 +3250,6 @@ test "std.zon parse int" {
33103250 }));
33113251 try std.testing.expectFmt(
33123252 \\input.zon:1:1: error: type 'u8' cannot represent value
3313 \\
33143253 , "{f}", .{diagnostics.fmt("input.zon")});
33153254 }
33163255
......@@ -3326,7 +3265,6 @@ test "std.zon parse int" {
33263265 \\input.zon:1:2: error: integer literal '-0' is ambiguous
33273266 \\input.zon:1:2: note: use '0' for an integer zero
33283267 \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero
3329 \\
33303268 , "{f}", .{diagnostics.fmt("input.zon")});
33313269 }
33323270
......@@ -3342,7 +3280,6 @@ test "std.zon parse int" {
33423280 \\input.zon:1:2: error: integer literal '-0' is ambiguous
33433281 \\input.zon:1:2: note: use '0' for an integer zero
33443282 \\input.zon:1:2: note: use '-0.0' for a floating-point signed zero
3345 \\
33463283 , "{f}", .{diagnostics.fmt("input.zon")});
33473284 }
33483285
......@@ -3372,7 +3309,6 @@ test "std.zon parse int" {
33723309 }));
33733310 try std.testing.expectFmt(
33743311 \\input.zon:1:1: error: expected number or 'inf' after '-'
3375 \\
33763312 , "{f}", .{diagnostics.fmt("input.zon")});
33773313 }
33783314
......@@ -3388,7 +3324,6 @@ test "std.zon parse int" {
33883324 );
33893325 try std.testing.expectFmt(
33903326 \\input.zon:1:1: error: expected number or 'inf' after '-'
3391 \\
33923327 , "{f}", .{diagnostics.fmt("input.zon")});
33933328 }
33943329
......@@ -3402,7 +3337,6 @@ test "std.zon parse int" {
34023337 }));
34033338 try std.testing.expectFmt(
34043339 \\input.zon:1:3: error: invalid digit 'g' for hex base
3405 \\
34063340 , "{f}", .{diagnostics.fmt("input.zon")});
34073341 }
34083342
......@@ -3417,7 +3351,6 @@ test "std.zon parse int" {
34173351 try std.testing.expectFmt(
34183352 \\input.zon:1:1: error: number '0123' has leading zero
34193353 \\input.zon:1:1: note: use '0o' prefix for octal literals
3420 \\
34213354 , "{f}", .{diagnostics.fmt("input.zon")});
34223355 }
34233356}
......@@ -3438,7 +3371,6 @@ test "std.zon negative char" {
34383371 }));
34393372 try std.testing.expectFmt(
34403373 \\input.zon:1:1: error: expected number or 'inf' after '-'
3441 \\
34423374 , "{f}", .{diagnostics.fmt("input.zon")});
34433375 }
34443376 {
......@@ -3450,7 +3382,6 @@ test "std.zon negative char" {
34503382 }));
34513383 try std.testing.expectFmt(
34523384 \\input.zon:1:1: error: expected number or 'inf' after '-'
3453 \\
34543385 , "{f}", .{diagnostics.fmt("input.zon")});
34553386 }
34563387}
......@@ -3638,7 +3569,6 @@ test "std.zon parse float" {
36383569 }));
36393570 try std.testing.expectFmt(
36403571 \\input.zon:1:1: error: expected number or 'inf' after '-'
3641 \\
36423572 , "{f}", .{diagnostics.fmt("input.zon")});
36433573 }
36443574
......@@ -3652,7 +3582,6 @@ test "std.zon parse float" {
36523582 }));
36533583 try std.testing.expectFmt(
36543584 \\input.zon:1:1: error: expected type 'i8'
3655 \\
36563585 , "{f}", .{diagnostics.fmt("input.zon")});
36573586 }
36583587
......@@ -3666,7 +3595,6 @@ test "std.zon parse float" {
36663595 }));
36673596 try std.testing.expectFmt(
36683597 \\input.zon:1:1: error: expected type 'i8'
3669 \\
36703598 , "{f}", .{diagnostics.fmt("input.zon")});
36713599 }
36723600
......@@ -3680,7 +3608,6 @@ test "std.zon parse float" {
36803608 }));
36813609 try std.testing.expectFmt(
36823610 \\input.zon:1:1: error: expected type 'i8'
3683 \\
36843611 , "{f}", .{diagnostics.fmt("input.zon")});
36853612 }
36863613
......@@ -3694,7 +3621,6 @@ test "std.zon parse float" {
36943621 }));
36953622 try std.testing.expectFmt(
36963623 \\input.zon:1:1: error: expected type 'i8'
3697 \\
36983624 , "{f}", .{diagnostics.fmt("input.zon")});
36993625 }
37003626
......@@ -3710,7 +3636,6 @@ test "std.zon parse float" {
37103636 \\input.zon:1:1: error: invalid expression
37113637 \\input.zon:1:1: note: ZON allows identifiers 'true', 'false', 'null', 'inf', and 'nan'
37123638 \\input.zon:1:1: note: precede identifier with '.' for an enum literal
3713 \\
37143639 , "{f}", .{diagnostics.fmt("input.zon")});
37153640 }
37163641
......@@ -3723,7 +3648,6 @@ test "std.zon parse float" {
37233648 }));
37243649 try std.testing.expectFmt(
37253650 \\input.zon:1:1: error: expected number or 'inf' after '-'
3726 \\
37273651 , "{f}", .{diagnostics.fmt("input.zon")});
37283652 }
37293653
......@@ -3740,7 +3664,6 @@ test "std.zon parse float" {
37403664 );
37413665 try std.testing.expectFmt(
37423666 \\input.zon:1:1: error: expected type 'f32'
3743 \\
37443667 , "{f}", .{diagnostics.fmt("input.zon")});
37453668 }
37463669}
......@@ -3982,7 +3905,6 @@ test "std.zon vector" {
39823905 );
39833906 try std.testing.expectFmt(
39843907 \\input.zon:1:2: error: expected 2 array elements; found 1
3985 \\
39863908 , "{f}", .{diagnostics.fmt("input.zon")});
39873909 }
39883910
......@@ -3999,7 +3921,6 @@ test "std.zon vector" {
39993921 );
40003922 try std.testing.expectFmt(
40013923 \\input.zon:1:13: error: index 2 outside of array of length 2
4002 \\
40033924 , "{f}", .{diagnostics.fmt("input.zon")});
40043925 }
40053926
......@@ -4016,7 +3937,6 @@ test "std.zon vector" {
40163937 );
40173938 try std.testing.expectFmt(
40183939 \\input.zon:1:8: error: expected type 'f32'
4019 \\
40203940 , "{f}", .{diagnostics.fmt("input.zon")});
40213941 }
40223942
......@@ -4033,7 +3953,6 @@ test "std.zon vector" {
40333953 );
40343954 try std.testing.expectFmt(
40353955 \\input.zon:1:1: error: expected type '@Vector(3, u8)'
4036 \\
40373956 , "{f}", .{diagnostics.fmt("input.zon")});
40383957 }
40393958
......@@ -4050,7 +3969,6 @@ test "std.zon vector" {
40503969 );
40513970 try std.testing.expectFmt(
40523971 \\input.zon:1:6: error: expected type 'u8'
4053 \\
40543972 , "{f}", .{diagnostics.fmt("input.zon")});
40553973 }
40563974}
......@@ -4244,7 +4162,6 @@ test "std.zon add pointers" {
42444162 );
42454163 try std.testing.expectFmt(
42464164 \\input.zon:1:1: error: expected type '?u8'
4247 \\
42484165 , "{f}", .{diagnostics.fmt("input.zon")});
42494166 }
42504167
......@@ -4260,7 +4177,6 @@ test "std.zon add pointers" {
42604177 );
42614178 try std.testing.expectFmt(
42624179 \\input.zon:1:1: error: expected type '?f32'
4263 \\
42644180 , "{f}", .{diagnostics.fmt("input.zon")});
42654181 }
42664182
......@@ -4276,7 +4192,6 @@ test "std.zon add pointers" {
42764192 );
42774193 try std.testing.expectFmt(
42784194 \\input.zon:1:1: error: expected type '?@Vector(3, u8)'
4279 \\
42804195 , "{f}", .{diagnostics.fmt("input.zon")});
42814196 }
42824197
......@@ -4292,7 +4207,6 @@ test "std.zon add pointers" {
42924207 );
42934208 try std.testing.expectFmt(
42944209 \\input.zon:1:1: error: expected type '?bool'
4295 \\
42964210 , "{f}", .{diagnostics.fmt("input.zon")});
42974211 }
42984212
......@@ -4308,7 +4222,6 @@ test "std.zon add pointers" {
43084222 );
43094223 try std.testing.expectFmt(
43104224 \\input.zon:1:1: error: expected optional struct
4311 \\
43124225 , "{f}", .{diagnostics.fmt("input.zon")});
43134226 }
43144227
......@@ -4324,7 +4237,6 @@ test "std.zon add pointers" {
43244237 );
43254238 try std.testing.expectFmt(
43264239 \\input.zon:1:1: error: expected optional tuple
4327 \\
43284240 , "{f}", .{diagnostics.fmt("input.zon")});
43294241 }
43304242
......@@ -4340,7 +4252,6 @@ test "std.zon add pointers" {
43404252 );
43414253 try std.testing.expectFmt(
43424254 \\input.zon:1:1: error: expected optional union
4343 \\
43444255 , "{f}", .{diagnostics.fmt("input.zon")});
43454256 }
43464257
......@@ -4356,7 +4267,6 @@ test "std.zon add pointers" {
43564267 );
43574268 try std.testing.expectFmt(
43584269 \\input.zon:1:1: error: expected optional array
4359 \\
43604270 , "{f}", .{diagnostics.fmt("input.zon")});
43614271 }
43624272
......@@ -4372,7 +4282,6 @@ test "std.zon add pointers" {
43724282 );
43734283 try std.testing.expectFmt(
43744284 \\input.zon:1:1: error: expected optional array
4375 \\
43764285 , "{f}", .{diagnostics.fmt("input.zon")});
43774286 }
43784287
......@@ -4388,7 +4297,6 @@ test "std.zon add pointers" {
43884297 );
43894298 try std.testing.expectFmt(
43904299 \\input.zon:1:1: error: expected optional array
4391 \\
43924300 , "{f}", .{diagnostics.fmt("input.zon")});
43934301 }
43944302
......@@ -4404,7 +4312,6 @@ test "std.zon add pointers" {
44044312 );
44054313 try std.testing.expectFmt(
44064314 \\input.zon:1:1: error: expected optional array
4407 \\
44084315 , "{f}", .{diagnostics.fmt("input.zon")});
44094316 }
44104317
......@@ -4420,7 +4327,6 @@ test "std.zon add pointers" {
44204327 );
44214328 try std.testing.expectFmt(
44224329 \\input.zon:1:1: error: expected optional string
4423 \\
44244330 , "{f}", .{diagnostics.fmt("input.zon")});
44254331 }
44264332
......@@ -4436,7 +4342,6 @@ test "std.zon add pointers" {
44364342 );
44374343 try std.testing.expectFmt(
44384344 \\input.zon:1:1: error: expected optional enum literal
4439 \\
44404345 , "{f}", .{diagnostics.fmt("input.zon")});
44414346 }
44424347}
......@@ -4697,7 +4602,6 @@ test "std.zon update optionals" {
46974602 }));
46984603 try std.testing.expectFmt(
46994604 \\input.zon:1:12: error: missing required field qux
4700 \\
47014605 , "{f}", .{diagnostics.fmt("input.zon")});
47024606 }
47034607
......@@ -4825,7 +4729,6 @@ test "std.zon update unions" {
48254729 }));
48264730 try std.testing.expectFmt(
48274731 \\input.zon:1:12: error: missing required field qux
4828 \\
48294732 , "{f}", .{diagnostics.fmt("input.zon")});
48304733 }
48314734