diff options
| author | Jonathan Marler <johnnymarler@gmail.com> | 2021-01-03 02:20:37 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-09 22:25:52 -0800 |
| commit | 1480c428065c01c6feff22ce84021c2e0e30aa9b (patch) | |
| tree | b54dc7156319d92d5947188b4684b4faae1ee8eb /src | |
| parent | 6a5a6386c60143258fc9970f52e26e3a974b52b5 (diff) | |
| download | zig-1480c428065c01c6feff22ce84021c2e0e30aa9b.tar.gz zig-1480c428065c01c6feff22ce84021c2e0e30aa9b.zip | |
require specifier for arrayish types
Diffstat (limited to 'src')
| -rw-r--r-- | src/Module.zig | 2 | ||||
| -rw-r--r-- | src/codegen.zig | 2 | ||||
| -rw-r--r-- | src/zir_sema.zig | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/Module.zig b/src/Module.zig index 8de03b54ab..a90998a386 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -2400,7 +2400,7 @@ fn getAnonTypeName(self: *Module, scope: *Scope, base_token: std.zig.ast.TokenIn else => unreachable, }; const loc = tree.tokenLocationLoc(0, tree.token_locs[base_token]); - return std.fmt.allocPrint(self.gpa, "{}:{}:{}", .{ base_name, loc.line, loc.column }); + return std.fmt.allocPrint(self.gpa, "{s}:{}:{}", .{ base_name, loc.line, loc.column }); } fn getNextAnonNameIndex(self: *Module) usize { diff --git a/src/codegen.zig b/src/codegen.zig index 63dbe3268e..9771386403 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -2223,7 +2223,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { writeInt(u32, try self.code.addManyAsArray(4), Instruction.cmp(.al, reg, op).toU32()); break :blk .ne; }, - else => return self.fail(inst.base.src, "TODO implement condbr {} when condition is {}", .{ self.target.cpu.arch, @tagName(cond) }), + else => return self.fail(inst.base.src, "TODO implement condbr {} when condition is {s}", .{ self.target.cpu.arch, @tagName(cond) }), }; const reloc = Reloc{ diff --git a/src/zir_sema.zig b/src/zir_sema.zig index f373d7174d..a8120108a4 100644 --- a/src/zir_sema.zig +++ b/src/zir_sema.zig @@ -1832,7 +1832,7 @@ fn zirBitwise(mod: *Module, scope: *Scope, inst: *zir.Inst.BinOp) InnerError!*In const is_int = scalar_tag == .Int or scalar_tag == .ComptimeInt; if (!is_int) { - return mod.fail(scope, inst.base.src, "invalid operands to binary bitwise expression: '{}' and '{}'", .{ @tagName(lhs.ty.zigTypeTag()), @tagName(rhs.ty.zigTypeTag()) }); + return mod.fail(scope, inst.base.src, "invalid operands to binary bitwise expression: '{s}' and '{s}'", .{ @tagName(lhs.ty.zigTypeTag()), @tagName(rhs.ty.zigTypeTag()) }); } if (casted_lhs.value()) |lhs_val| { |
