diff --git a/lang/src/parser.rs b/lang/src/parser.rs index d5c523f..2d76b47 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 => {