From f95826d90432d50ffe1a185d829fcbb1aff8063b Mon Sep 17 00:00:00 2001 From: ryuukk Date: Sat, 26 Oct 2024 06:00:21 +0000 Subject: [PATCH] remove unused shit ass error --- zig/lib/std/zig/AstGen.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zig/lib/std/zig/AstGen.zig b/zig/lib/std/zig/AstGen.zig index dc39ce62f5..a8828e5859 100644 --- a/zig/lib/std/zig/AstGen.zig +++ b/zig/lib/std/zig/AstGen.zig @@ -3098,7 +3098,7 @@ fn checkUsed(gz: *GenZir, outer_scope: *Scope, inner_scope: *Scope) InnerError!v .local_val => { const s = scope.cast(Scope.LocalVal).?; if (s.used == 0 and s.discarded == 0) { - try astgen.appendErrorTok(s.token_src, "unused {s}", .{@tagName(s.id_cat)}); + // try astgen.appendErrorTok(s.token_src, "unused {s}", .{@tagName(s.id_cat)}); } else if (s.used != 0 and s.discarded != 0) { try astgen.appendErrorTokNotes(s.discarded, "pointless discard of {s}", .{@tagName(s.id_cat)}, &[_]u32{ try gz.astgen.errNoteTok(s.used, "used here", .{}), @@ -3109,7 +3109,7 @@ fn checkUsed(gz: *GenZir, outer_scope: *Scope, inner_scope: *Scope) InnerError!v .local_ptr => { const s = scope.cast(Scope.LocalPtr).?; if (s.used == 0 and s.discarded == 0) { - try astgen.appendErrorTok(s.token_src, "unused {s}", .{@tagName(s.id_cat)}); + // try astgen.appendErrorTok(s.token_src, "unused {s}", .{@tagName(s.id_cat)}); } else { if (s.used != 0 and s.discarded != 0) { try astgen.appendErrorTokNotes(s.discarded, "pointless discard of {s}", .{@tagName(s.id_cat)}, &[_]u32{ @@ -3117,9 +3117,9 @@ fn checkUsed(gz: *GenZir, outer_scope: *Scope, inner_scope: *Scope) InnerError!v }); } if (s.id_cat == .@"local variable" and !s.used_as_lvalue) { - try astgen.appendErrorTokNotes(s.token_src, "local variable is never mutated", .{}, &.{ - try astgen.errNoteTok(s.token_src, "consider using 'const'", .{}), - }); + // try astgen.appendErrorTokNotes(s.token_src, "local variable is never mutated", .{}, &.{ + // try astgen.errNoteTok(s.token_src, "consider using 'const'", .{}), + // }); } }