From 9858dcf41f98a4dbf975a8791234d7f7b9f7df7c Mon Sep 17 00:00:00 2001 From: bangbangsheshotmedown Date: Thu, 31 Oct 2024 12:23:27 +0000 Subject: [PATCH] Update Sema.zig --- zig/src/Sema.zig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zig/src/Sema.zig b/zig/src/Sema.zig index b0ce7729cf..cb63e807ed 100644 --- a/zig/src/Sema.zig +++ b/zig/src/Sema.zig @@ -3456,13 +3456,13 @@ fn ensureResultUsed( .void, .noreturn => return, .error_set => return sema.fail(block, src, "error set is ignored", .{}), .error_union => { - const msg = msg: { - const msg = try sema.errMsg(src, "error union is ignored", .{}); - errdefer msg.destroy(sema.gpa); - try sema.errNote(src, msg, "consider using 'try', 'catch', or 'if'", .{}); - break :msg msg; - }; - return sema.failWithOwnedErrorMsg(block, msg); + // const msg = msg: { + // const msg = try sema.errMsg(src, "error union is ignored", .{}); + // errdefer msg.destroy(sema.gpa); + // try sema.errNote(src, msg, "consider using 'try', 'catch', or 'if'", .{}); + // break :msg msg; + // }; + // return sema.failWithOwnedErrorMsg(block, msg); }, else => { const msg = msg: {