Update langref errors
parent
2f465761bb
commit
475fc2934b
|
@ -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);
|
||||
|
|
|
@ -8713,7 +8713,7 @@ fn foo(x: []const u8) u8 {
|
|||
{#header_close#}
|
||||
{#header_open|Cast Negative Number to Unsigned Integer#}
|
||||
<p>At compile-time:</p>
|
||||
{#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#}
|
||||
<p>At compile-time:</p>
|
||||
{#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);
|
||||
|
|
Loading…
Reference in New Issue