From 4d573ca0d3bb65aa7d6a70abc33cdfd23e913913 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 11 Oct 2024 17:29:54 +0100 Subject: [PATCH] Rust: Remove the workaround in rust/unused-variable. --- rust/ql/src/queries/unusedentities/UnusedVariable.ql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/ql/src/queries/unusedentities/UnusedVariable.ql b/rust/ql/src/queries/unusedentities/UnusedVariable.ql index f6be18b76e15b..5fb0cdfecdc16 100644 --- a/rust/ql/src/queries/unusedentities/UnusedVariable.ql +++ b/rust/ql/src/queries/unusedentities/UnusedVariable.ql @@ -14,6 +14,5 @@ from Variable v where not exists(v.getAnAccess()) and not exists(v.getInitializer()) and - not v.getName().charAt(0) = "_" and - exists(File f | f.getBaseName() = "main.rs" | v.getLocation().getFile() = f) // temporarily severely limit results + not v.getName().charAt(0) = "_" select v, "Variable is not used."