Skip to content

Commit

Permalink
Fix clippy with no features
Browse files Browse the repository at this point in the history
Kampfkarren committed Jan 20, 2024
1 parent 2d13175 commit 838461b
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions full-moon/src/ast/parser_structs.rs
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ use super::{parsers::parse_block, Ast, Block, LuaVersion};
pub struct ParserState {
errors: Vec<crate::Error>,
lexer: Lexer,
// Unused with no features enabled
#[allow(unused)]
lua_version: LuaVersion,
}

@@ -19,6 +21,8 @@ impl ParserState {
}
}

// Unused with no features enabled
#[allow(unused)]
pub fn lua_version(&self) -> LuaVersion {
self.lua_version
}
3 changes: 3 additions & 0 deletions full-moon/src/ast/parsers.rs
Original file line number Diff line number Diff line change
@@ -107,6 +107,9 @@ fn expect_block_with_end(

enum StmtVariant {
Stmt(ast::Stmt),

// Used for things like Luau's `continue`, but nothing constructs it in Lua 5.1 alone.
#[allow(unused)]
LastStmt(ast::LastStmt),
}

0 comments on commit 838461b

Please sign in to comment.