aboutsummaryrefslogtreecommitdiff
path: root/lib/std/meta.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2023-07-04 10:34:31 -0400
committerVeikka Tuominen <git@vexu.eu>2023-09-19 15:15:05 +0300
commitee4ced96833470f9432e6a5dc5b31534457280c0 (patch)
tree8d35dc654895f029e23ce710367b839814ed5cd9 /lib/std/meta.zig
parent3e79315d19c7dfe5f9b90185d8030209ef8dd829 (diff)
downloadzig-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.zig6
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)