aboutsummaryrefslogtreecommitdiff
path: root/lib/std/special
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2019-12-09 21:56:19 +0100
committerAndrew Kelley <andrew@ziglang.org>2019-12-10 11:09:41 -0500
commit4b4fbe388732da795c924293b4d1af3d9ca5ea69 (patch)
tree278ddda90440c1f68aee5acb7318371aa2a2a7ad /lib/std/special
parentf0ee0688f20dd012b4e069324abdba081ff19369 (diff)
downloadzig-4b4fbe388732da795c924293b4d1af3d9ca5ea69.tar.gz
zig-4b4fbe388732da795c924293b4d1af3d9ca5ea69.zip
Replace @typeOf with @TypeOf in all zig source
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
Diffstat (limited to 'lib/std/special')
-rw-r--r--lib/std/special/build_runner.zig2
-rw-r--r--lib/std/special/compiler_rt.zig8
-rw-r--r--lib/std/special/start.zig8
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/std/special/build_runner.zig b/lib/std/special/build_runner.zig
index 03d1e8fe1d..0a5e435a54 100644
--- a/lib/std/special/build_runner.zig
+++ b/lib/std/special/build_runner.zig
@@ -125,7 +125,7 @@ pub fn main() !void {
}
fn runBuild(builder: *Builder) anyerror!void {
- switch (@typeId(@typeOf(root.build).ReturnType)) {
+ switch (@typeId(@TypeOf(root.build).ReturnType)) {
.Void => root.build(builder),
.ErrorUnion => try root.build(builder),
else => @compileError("expected return type of build to be 'void' or '!void'"),
diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig
index 1fbb618b1e..0426f72417 100644
--- a/lib/std/special/compiler_rt.zig
+++ b/lib/std/special/compiler_rt.zig
@@ -384,7 +384,7 @@ extern fn __aeabi_uidivmod(n: u32, d: u32) extern struct {
} {
@setRuntimeSafety(is_test);
- var result: @typeOf(__aeabi_uidivmod).ReturnType = undefined;
+ var result: @TypeOf(__aeabi_uidivmod).ReturnType = undefined;
result.q = __udivmodsi4(n, d, &result.r);
return result;
}
@@ -395,7 +395,7 @@ extern fn __aeabi_uldivmod(n: u64, d: u64) extern struct {
} {
@setRuntimeSafety(is_test);
- var result: @typeOf(__aeabi_uldivmod).ReturnType = undefined;
+ var result: @TypeOf(__aeabi_uldivmod).ReturnType = undefined;
result.q = __udivmoddi4(n, d, &result.r);
return result;
}
@@ -406,7 +406,7 @@ extern fn __aeabi_idivmod(n: i32, d: i32) extern struct {
} {
@setRuntimeSafety(is_test);
- var result: @typeOf(__aeabi_idivmod).ReturnType = undefined;
+ var result: @TypeOf(__aeabi_idivmod).ReturnType = undefined;
result.q = __divmodsi4(n, d, &result.r);
return result;
}
@@ -417,7 +417,7 @@ extern fn __aeabi_ldivmod(n: i64, d: i64) extern struct {
} {
@setRuntimeSafety(is_test);
- var result: @typeOf(__aeabi_ldivmod).ReturnType = undefined;
+ var result: @TypeOf(__aeabi_ldivmod).ReturnType = undefined;
result.q = __divmoddi4(n, d, &result.r);
return result;
}
diff --git a/lib/std/special/start.zig b/lib/std/special/start.zig
index b5e4e2edab..60745dab7f 100644
--- a/lib/std/special/start.zig
+++ b/lib/std/special/start.zig
@@ -25,7 +25,7 @@ comptime {
}
} else if (builtin.output_mode == .Exe or @hasDecl(root, "main")) {
if (builtin.link_libc and @hasDecl(root, "main")) {
- if (@typeInfo(@typeOf(root.main)).Fn.calling_convention != .C) {
+ if (@typeInfo(@TypeOf(root.main)).Fn.calling_convention != .C) {
@export("main", main, .Weak);
}
} else if (builtin.os == .windows) {
@@ -69,7 +69,7 @@ extern fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) u
uefi.handle = handle;
uefi.system_table = system_table;
- switch (@typeInfo(@typeOf(root.main).ReturnType)) {
+ switch (@typeInfo(@TypeOf(root.main).ReturnType)) {
.NoReturn => {
root.main();
},
@@ -248,7 +248,7 @@ async fn callMainAsync(loop: *std.event.Loop) u8 {
// This is not marked inline because it is called with @asyncCall when
// there is an event loop.
fn callMain() u8 {
- switch (@typeInfo(@typeOf(root.main).ReturnType)) {
+ switch (@typeInfo(@TypeOf(root.main).ReturnType)) {
.NoReturn => {
root.main();
},
@@ -270,7 +270,7 @@ fn callMain() u8 {
}
return 1;
};
- switch (@typeInfo(@typeOf(result))) {
+ switch (@typeInfo(@TypeOf(result))) {
.Void => return 0,
.Int => |info| {
if (info.bits != 8) {