From fe5a8631f66e7acde8707a68ad25074ab5b1f408 Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Sun, 17 Nov 2024 18:44:24 +0100 Subject: [PATCH] fixed a bug of not marking idents as used --- lang/src/parser.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lang/src/parser.rs b/lang/src/parser.rs index d5c523f1..2d76b470 100644 --- a/lang/src/parser.rs +++ b/lang/src/parser.rs @@ -249,7 +249,10 @@ impl<'a, 'b> Parser<'a, 'b> { .enumerate() .rfind(|(_, elem)| self.lexer.slice(elem.ident.range()) == name) { - Some((i, elem)) => (i, elem, false), + Some((i, elem)) => { + elem.used = true; + (i, elem, false) + } None => { let ident = match Ident::new(token.start, name.len() as _) { None => {