From 8de99e631d9eb84761d3cdef71b25a58648c2227 Mon Sep 17 00:00:00 2001 From: Yureka Date: Sun, 27 Oct 2024 16:02:51 +0100 Subject: [PATCH] fix(tvix/eval): fix unused variable warnings being inverted Thanks to lexi for finding this Change-Id: Ic248af55426630b5e07183e4eac1596d52954478 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12696 Tested-by: BuildkiteCI Autosubmit: yuka Reviewed-by: tazjin --- tvix/eval/src/compiler/scope.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index bb1784e67..b8cd855ec 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -366,7 +366,7 @@ impl Scope { // lifetime, and emit a warning otherwise (unless the // user explicitly chose to ignore it by prefixing the // identifier with `_`) - if local.is_used() { + if !local.is_used() { unused_spans.extend(local.span); }