| author | |
| committer | |
| log | 92f1a29c4082817f11e12ff58bd4fdb5fffb8608 |
| tree | eec9d9d740422b004a0062162c4772a82a402a72 |
| parent | 1310ef75777209f061bfd61473db75911538b5ff |
This matches the language reference.4 files changed, 7 insertions(+), 3 deletions(-)
lib/std/build/OptionsStep.zig+1-1| ... | ... | @@ -177,7 +177,7 @@ fn printLiteral(out: anytype, val: anytype, indent: u8) !void { |
| 177 | 177 | .Float, |
| 178 | 178 | .Null, |
| 179 | 179 | => try out.print("{any}", .{val}), |
| 180 | else => @compileError(comptime std.fmt.comptimePrint("`{s}` are not yet supported as build options", .{@tagName(@typeInfo(T))})), | |
| 180 | else => @compileError(std.fmt.comptimePrint("`{s}` are not yet supported as build options", .{@tagName(@typeInfo(T))})), | |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 |
lib/std/fmt.zig+1-1| ... | ... | @@ -199,7 +199,7 @@ pub fn format( |
| 199 | 199 | switch (missing_count) { |
| 200 | 200 | 0 => unreachable, |
| 201 | 201 | 1 => @compileError("unused argument in '" ++ fmt ++ "'"), |
| 202 | else => @compileError((comptime comptimePrint("{d}", .{missing_count})) ++ " unused arguments in '" ++ fmt ++ "'"), | |
| 202 | else => @compileError(comptimePrint("{d}", .{missing_count}) ++ " unused arguments in '" ++ fmt ++ "'"), | |
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | } |
lib/std/testing.zig+1-1| ... | ... | @@ -765,7 +765,7 @@ pub fn checkAllAllocationFailures(backing_allocator: std.mem.Allocator, comptime |
| 765 | 765 | } |
| 766 | 766 | const expected_args_tuple_len = fn_args_fields.len - 1; |
| 767 | 767 | if (extra_args.len != expected_args_tuple_len) { |
| 768 | @compileError("The provided function expects " ++ (comptime std.fmt.comptimePrint("{d}", .{expected_args_tuple_len})) ++ " extra arguments, but the provided tuple contains " ++ (comptime std.fmt.comptimePrint("{d}", .{extra_args.len}))); | |
| 768 | @compileError("The provided function expects " ++ std.fmt.comptimePrint("{d}", .{expected_args_tuple_len}) ++ " extra arguments, but the provided tuple contains " ++ std.fmt.comptimePrint("{d}", .{extra_args.len})); | |
| 769 | 769 | } |
| 770 | 770 | |
| 771 | 771 | // Setup the tuple that will actually be used with @call (we'll need to insert |
src/AstGen.zig+4| ... | ... | @@ -8455,8 +8455,12 @@ fn simpleUnOp( |
| 8455 | 8455 | operand_node: Ast.Node.Index, |
| 8456 | 8456 | tag: Zir.Inst.Tag, |
| 8457 | 8457 | ) InnerError!Zir.Inst.Ref { |
| 8458 | const prev_force_comptime = gz.force_comptime; | |
| 8459 | defer gz.force_comptime = prev_force_comptime; | |
| 8460 | ||
| 8458 | 8461 | switch (tag) { |
| 8459 | 8462 | .tag_name, .error_name, .ptr_to_int => try emitDbgNode(gz, node), |
| 8463 | .compile_error => gz.force_comptime = true, | |
| 8460 | 8464 | else => {}, |
| 8461 | 8465 | } |
| 8462 | 8466 | const operand = try expr(gz, scope, operand_ri, operand_node); |