diff --git a/doc/docgen.zig b/doc/docgen.zig index 52f373f5b..6916318eb 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -1251,7 +1251,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: any }, } if (mem.indexOf(u8, result.stderr, error_match) == null) { - print("{}\nExpected to find '{}' in stderr", .{ result.stderr, error_match }); + print("{}\nExpected to find '{}' in stderr\n", .{ result.stderr, error_match }); return parseError(tokenizer, code.source_token, "example did not have expected compile error", .{}); } const escaped_stderr = try escapeHtml(allocator, result.stderr); @@ -1306,7 +1306,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: any }, } if (mem.indexOf(u8, result.stderr, error_match) == null) { - print("{}\nExpected to find '{}' in stderr", .{ result.stderr, error_match }); + print("{}\nExpected to find '{}' in stderr\n", .{ result.stderr, error_match }); return parseError(tokenizer, code.source_token, "example did not have expected runtime safety error message", .{}); } const escaped_stderr = try escapeHtml(allocator, result.stderr); @@ -1385,7 +1385,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: any }, } if (mem.indexOf(u8, result.stderr, error_match) == null) { - print("{}\nExpected to find '{}' in stderr", .{ result.stderr, error_match }); + print("{}\nExpected to find '{}' in stderr\n", .{ result.stderr, error_match }); return parseError(tokenizer, code.source_token, "example did not have expected compile error message", .{}); } const escaped_stderr = try escapeHtml(allocator, result.stderr); diff --git a/doc/langref.html.in b/doc/langref.html.in index 31d3b9b1e..ae5ff666d 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -8713,7 +8713,7 @@ fn foo(x: []const u8) u8 { {#header_close#} {#header_open|Cast Negative Number to Unsigned Integer#}
At compile-time:
- {#code_begin|test_err|cannot cast negative value -1 to unsigned integer type 'u32'#} + {#code_begin|test_err|attempt to cast negative value to unsigned integer#} comptime { const value: i32 = -1; const unsigned = @intCast(u32, value); @@ -8735,7 +8735,7 @@ pub fn main() void { {#header_close#} {#header_open|Cast Truncates Data#}At compile-time:
- {#code_begin|test_err|integer value 300 cannot be coerced to type 'u8'#} + {#code_begin|test_err|cast from 'u16' to 'u8' truncates bits#} comptime { const spartan_count: u16 = 300; const byte = @intCast(u8, spartan_count);