diff options
| author | r00ster91 <r00ster91@proton.me> | 2023-07-04 10:34:31 -0400 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-09-19 15:15:05 +0300 |
| commit | ee4ced96833470f9432e6a5dc5b31534457280c0 (patch) | |
| tree | 8d35dc654895f029e23ce710367b839814ed5cd9 /lib/std/meta.zig | |
| parent | 3e79315d19c7dfe5f9b90185d8030209ef8dd829 (diff) | |
| download | zig-ee4ced96833470f9432e6a5dc5b31534457280c0.tar.gz zig-ee4ced96833470f9432e6a5dc5b31534457280c0.zip | |
write function types consistently with a space before `fn` keyword
Currently, the compiler (like @typeName) writes it `fn(...) Type` but
zig fmt writes it `fn (...) Type` (notice the space after `fn`).
This inconsistency is now resolved and function types are consistently
written the zig fmt way. Before this there were more `fn (...) Type`
occurrences than `fn(...) Type` already.
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index b10ecd2731..c8ef19c017 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -969,9 +969,9 @@ test "std.meta.Float" { /// correspond to the argument types. /// /// Examples: -/// - `ArgsTuple(fn() void)` ⇒ `tuple { }` -/// - `ArgsTuple(fn(a: u32) u32)` ⇒ `tuple { u32 }` -/// - `ArgsTuple(fn(a: u32, b: f16) noreturn)` ⇒ `tuple { u32, f16 }` +/// - `ArgsTuple(fn () void)` ⇒ `tuple { }` +/// - `ArgsTuple(fn (a: u32) u32)` ⇒ `tuple { u32 }` +/// - `ArgsTuple(fn (a: u32, b: f16) noreturn)` ⇒ `tuple { u32, f16 }` pub fn ArgsTuple(comptime Function: type) type { const info = @typeInfo(Function); if (info != .Fn) |
