fix: resolve all cargo compiler warnings
- Fix unused import std::io::Read in interpreter.rs by using qualified call - Add #[allow(dead_code)] to CGenError.span (kept for future error reporting) - Add #[allow(dead_code)] to local_vars field (planned for free variable analysis) - Add #[allow(dead_code)] to unbox_value and emit_all_scope_cleanup methods All 263 tests pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,7 @@ use std::fmt::Write;
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CGenError {
|
||||
pub message: String,
|
||||
#[allow(dead_code)]
|
||||
pub span: Option<Span>,
|
||||
}
|
||||
|
||||
@@ -96,6 +97,7 @@ pub struct CBackend {
|
||||
/// Closures to emit (collected during expression generation)
|
||||
closures: Vec<ClosureInfo>,
|
||||
/// Variables in scope (for free variable analysis)
|
||||
#[allow(dead_code)]
|
||||
local_vars: HashSet<String>,
|
||||
/// Functions that return closures
|
||||
closure_returning_functions: HashSet<String>,
|
||||
@@ -2388,6 +2390,7 @@ impl CBackend {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn unbox_value(&self, val: &str, type_hint: Option<&str>) -> String {
|
||||
match type_hint {
|
||||
Some("LuxInt") => format!("lux_unbox_int({})", val),
|
||||
@@ -3323,6 +3326,7 @@ impl CBackend {
|
||||
}
|
||||
|
||||
/// Emit decrefs for all variables in all scopes (for early return)
|
||||
#[allow(dead_code)]
|
||||
fn emit_all_scope_cleanup(&mut self) {
|
||||
// Collect all decrefs first to avoid borrow issues
|
||||
let decrefs: Vec<String> = self.rc_scopes.iter().rev()
|
||||
|
||||
Reference in New Issue
Block a user