diff options
| author | Veikka Tuominen <git@vexu.eu> | 2024-01-15 20:01:26 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-02-12 12:54:32 -0800 |
| commit | 51d67c7c8f20e89b70a62f0b82abf77a95868bec (patch) | |
| tree | 7ff92d1a773e1dbf23cc3b346f9c8d95e11c6472 /src/type.zig | |
| parent | fad5e7a997344eddc45511df581472acaf0e880e (diff) | |
| download | zig-51d67c7c8f20e89b70a62f0b82abf77a95868bec.tar.gz zig-51d67c7c8f20e89b70a62f0b82abf77a95868bec.zip | |
Sema: add declared here notes in `fail`
This ensures that the note is added in more places and that `errMsg` needs to be used in fewer places.
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig index 016a584599..43eaa9132a 100644 --- a/src/type.zig +++ b/src/type.zig @@ -130,7 +130,9 @@ pub const Type = struct { @compileError("do not format types directly; use either ty.fmtDebug() or ty.fmt()"); } - pub fn fmt(ty: Type, module: *Module) std.fmt.Formatter(format2) { + pub const Formatter = std.fmt.Formatter(format2); + + pub fn fmt(ty: Type, module: *Module) Formatter { return .{ .data = .{ .ty = ty, .module = module, |
