authorgravatar for ryan.saunderson88@gmail.comdimenus <ryan.saunderson88@gmail.com> 2019-11-08 18:16:03-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-08 19:19:08-05:00
log8c8078513e60df7e017f91193524384e4e9640ca
tree97b6bb381ba2180c915a1ca8ec46a7be7e38eb90
parent6d5abf87ecd3509c6fb8b9c917b73b4db2ae59ff

missed cast in std/target.zig


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/target.zig+2-2
......@@ -319,7 +319,7 @@ pub const Target = union(enum) {
319319 inline for (info.Union.fields) |field| {
320320 if (mem.eql(u8, text, field.name)) {
321321 if (field.field_type == void) {
322 return (Arch)(@field(Arch, field.name));
322 return @as(Arch, @field(Arch, field.name));
323323 } else {
324324 const sub_info = @typeInfo(field.field_type);
325325 inline for (sub_info.Enum.fields) |sub_field| {
......@@ -581,7 +581,7 @@ pub const Target = union(enum) {
581581 };
582582
583583 pub fn getExternalExecutor(self: Target) Executor {
584 if (@as(@TagType(Target),self) == .Native) return .native;
584 if (@as(@TagType(Target), self) == .Native) return .native;
585585
586586 // If the target OS matches the host OS, we can use QEMU to emulate a foreign architecture.
587587 if (self.getOs() == builtin.os) {