diff --git a/src/compile/block.rs b/src/compile/block.rs index a4eba19..dcac935 100644 --- a/src/compile/block.rs +++ b/src/compile/block.rs @@ -18,7 +18,7 @@ impl<'c, 't> TranslateAst<'c, 't> { TranslateAst { ctx, text } } - pub fn translate(&mut self, ast: &Vec) -> Result { + pub fn translate(&mut self, _ast: &Vec) -> Result { todo!() } @@ -29,7 +29,7 @@ impl<'c, 't> TranslateAst<'c, 't> { kind: BaseExprKind::Ident, .. }) => { - let name = expr.text_at(self.text); + let _name = expr.text_at(self.text); //let name_id = self.ctx. todo!() //Ok(ir::Lhs::Name( @@ -42,7 +42,7 @@ impl<'c, 't> TranslateAst<'c, 't> { impl Visit for TranslateAst<'_, '_> { type Out = Result; - fn visit(&mut self, stmt: &Stmt) -> Self::Out { + fn visit(&mut self, _stmt: &Stmt) -> Self::Out { todo!() } } @@ -50,7 +50,7 @@ impl Visit for TranslateAst<'_, '_> { impl Visit for TranslateAst<'_, '_> { type Out = Result; - fn visit(&mut self, stmt: &AssignStmt) -> Self::Out { + fn visit(&mut self, _stmt: &AssignStmt) -> Self::Out { todo!() } } @@ -58,7 +58,7 @@ impl Visit for TranslateAst<'_, '_> { impl Visit for TranslateAst<'_, '_> { type Out = Result; - fn visit(&mut self, expr: &Expr) -> Self::Out { + fn visit(&mut self, _expr: &Expr) -> Self::Out { todo!() } } diff --git a/src/main.rs b/src/main.rs index df37f24..39b1847 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ fn main() -> Result<()> { let mut collect_names = compile::name::CollectNames::new(&mut ctx, text.as_str()); collect_names.collect(&ast); } - let names = ctx.name_stack_mut().pop().unwrap(); + let _names = ctx.name_stack_mut().pop().unwrap(); //println!("{:#?}", names); Ok(()) diff --git a/src/obj/attrs.rs b/src/obj/attrs.rs index 0bb7c0b..ddf17d6 100644 --- a/src/obj/attrs.rs +++ b/src/obj/attrs.rs @@ -118,22 +118,21 @@ impl<'i, I: Intern> AttrsBuilder<'i, I> { #[test] fn test_attrs_new() { - use crate::mem::{BasicGc, BasicIntern}; + use crate::mem::BasicGc; let mut gc = BasicGc::default(); - let mut intern = BasicIntern::default(); let attrs_ref = Attrs::new(&mut gc, Default::default()); { let mut attrs = attrs_ref.borrow_mut(); - let sym = intern.intern_sym("symbol"); + let sym = Sym::new(0); attrs.insert(sym, attrs_ref.as_dyn()); assert!(ptr::eq( dbg!(attrs.get(sym).unwrap().as_ptr()), - dbg!(attrs_ref.as_dyn().as_ptr()) // ^ as_dyn() is important here - this will cause the test to fail - // otherwise + dbg!(attrs_ref.as_dyn().as_ptr()) + // as_dyn() is important here - this will cause the test to fail otherwise ),); } } diff --git a/src/obj/fun.rs b/src/obj/fun.rs index 9ef4543..274b667 100644 --- a/src/obj/fun.rs +++ b/src/obj/fun.rs @@ -9,7 +9,7 @@ pub struct NativeFun { } impl NativeFun { - pub fn new(attrs: AttrsRef, name: StrRef, fn_ptr: NativeFunPtr) -> Self { + pub fn new(attrs: AttrsRef, _name: StrRef, fn_ptr: NativeFunPtr) -> Self { // TODO : clone attrs, add name NativeFun { attrs, fn_ptr } }