[INFO] cloning repository https://github.com/CyberCat3/CahnLang [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CyberCat3/CahnLang" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCyberCat3%2FCahnLang", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCyberCat3%2FCahnLang'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 233044660e3325a707d7c4e4e3214fc8e565711b [INFO] linting CyberCat3/CahnLang against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCyberCat3%2FCahnLang" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/CyberCat3/CahnLang [INFO] finished tweaking git repo https://github.com/CyberCat3/CahnLang [INFO] tweaked toml for git repo https://github.com/CyberCat3/CahnLang written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/CyberCat3/CahnLang on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/CyberCat3/CahnLang already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded intmap v0.7.0 [INFO] [stderr] Downloaded ahash v0.7.2 [INFO] [stderr] Downloaded itertools v0.10.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9c73639d4be44f68009630cd5bb7eb6af7574362b1aeaebfa33d3a4434233f76 [INFO] running `Command { std: "docker" "start" "-a" "9c73639d4be44f68009630cd5bb7eb6af7574362b1aeaebfa33d3a4434233f76", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9c73639d4be44f68009630cd5bb7eb6af7574362b1aeaebfa33d3a4434233f76", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9c73639d4be44f68009630cd5bb7eb6af7574362b1aeaebfa33d3a4434233f76", kill_on_drop: false }` [INFO] [stdout] 9c73639d4be44f68009630cd5bb7eb6af7574362b1aeaebfa33d3a4434233f76 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e978cf1206bb444b413a94ab7ef2cbe585c784889694655fca48bd3a2f586c2f [INFO] running `Command { std: "docker" "start" "-a" "e978cf1206bb444b413a94ab7ef2cbe585c784889694655fca48bd3a2f586c2f", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.86 [INFO] [stderr] Compiling syn v1.0.60 [INFO] [stderr] Compiling getrandom v0.2.2 [INFO] [stderr] Checking once_cell v1.7.0 [INFO] [stderr] Compiling ahash v0.7.2 [INFO] [stderr] Checking intmap v0.7.0 [INFO] [stderr] Checking itertools v0.10.0 [INFO] [stderr] Checking bumpalo v3.6.1 [INFO] [stderr] Compiling thiserror-impl v1.0.24 [INFO] [stderr] Checking thiserror v1.0.24 [INFO] [stderr] Checking cahn_lang v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/runtime/value.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{self, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_local` is never used [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 54 | impl<'a> CodeGenerator<'a> { [INFO] [stdout] | -------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 142 | fn get_local(&self, index: usize) -> Option<&Local> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `read_u64`, `assert_function`, and `assert_return_address` are never used [INFO] [stdout] --> src/runtime/vm.rs:124:8 [INFO] [stdout] | [INFO] [stdout] 41 | impl<'a> VM<'a> { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 124 | fn read_u64(&mut self) -> u64 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | fn assert_function<'b>(&'b self, val: Value) -> &'a CahnFunction { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 155 | fn assert_return_address(&self, val: Value) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:221:51 [INFO] [stdout] | [INFO] [stdout] 221 | let local = self.get_local_index_by_token(&identifier)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `identifier` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:289:25 [INFO] [stdout] | [INFO] [stdout] 289 | fn add_string_slice<'b>(&mut self, string: &'b str) -> (u32, u32) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 289 - fn add_string_slice<'b>(&mut self, string: &'b str) -> (u32, u32) { [INFO] [stdout] 289 + fn add_string_slice(&mut self, string: &str) -> (u32, u32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u32, u32)` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:304:39 [INFO] [stdout] | [INFO] [stdout] 304 | Entry::Occupied(entry) => entry.get().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*entry.get()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:480:9 [INFO] [stdout] | [INFO] [stdout] 480 | / Ok(match stmt { [INFO] [stdout] 481 | | Stmt::Program(ps) => self.visit_program_stmt(ps)?, [INFO] [stdout] 482 | | [INFO] [stdout] 483 | | Stmt::Block(bs) => self.visit_block_stmt(bs)?, [INFO] [stdout] ... | [INFO] [stdout] 557 | | Stmt::Return(_) => unimplemented!(), [INFO] [stdout] 558 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 480 ~ let _: () = match stmt { [INFO] [stdout] 481 + Stmt::Program(ps) => self.visit_program_stmt(ps)?, [INFO] [stdout] 482 + [INFO] [stdout] 483 + Stmt::Block(bs) => self.visit_block_stmt(bs)?, [INFO] [stdout] 484 + [INFO] [stdout] 485 + Stmt::StmtList(sl) => self.visit_stmt_list(sl)?, [INFO] [stdout] 486 + [INFO] [stdout] 487 + Stmt::Print(ps) => { [INFO] [stdout] 488 + self.visit_expr(&ps.inner)?; [INFO] [stdout] 489 + self.set_source_pos(ps.print_token.pos); [INFO] [stdout] 490 + self.emit_instruction(Instruction::Print); [INFO] [stdout] 491 + } [INFO] [stdout] 492 + [INFO] [stdout] 493 + Stmt::VarDecl(vds) => { [INFO] [stdout] 494 + self.visit_expr(&vds.init_expr)?; [INFO] [stdout] 495 + self.set_source_pos(vds.var_token.pos); [INFO] [stdout] 496 + self.declare_local(&vds.identifier.lexeme); [INFO] [stdout] 497 + } [INFO] [stdout] 498 + [INFO] [stdout] 499 + Stmt::If(is) => { [INFO] [stdout] 500 + self.visit_expr(&is.condition)?; [INFO] [stdout] 501 + [INFO] [stdout] 502 + self.set_source_pos(is.if_token.pos); [INFO] [stdout] 503 + let then_jump = self.emit_jump_instruction(Instruction::JumpIfFalse); [INFO] [stdout] 504 + [INFO] [stdout] 505 + self.visit_block_stmt(&is.then_clause)?; [INFO] [stdout] 506 + [INFO] [stdout] 507 + let mut else_jump = None; [INFO] [stdout] 508 + [INFO] [stdout] 509 + if let Some(ref else_token) = is.else_token { [INFO] [stdout] 510 + self.set_source_pos(else_token.pos); [INFO] [stdout] 511 + else_jump = Some(self.emit_jump_instruction(Instruction::Jump)); [INFO] [stdout] 512 + } [INFO] [stdout] 513 + [INFO] [stdout] 514 + self.patch_jump_instruction(then_jump, self.code.len()); [INFO] [stdout] 515 + [INFO] [stdout] 516 + if let Some(else_block) = &is.else_clause { [INFO] [stdout] 517 + self.visit_stmt(else_block)?; [INFO] [stdout] 518 + self.patch_jump_instruction(else_jump.unwrap(), self.code.len()); [INFO] [stdout] 519 + } [INFO] [stdout] 520 + } [INFO] [stdout] 521 + [INFO] [stdout] 522 + Stmt::While(ws) => { [INFO] [stdout] 523 + let start_adress = self.code.len(); [INFO] [stdout] 524 + assert!( [INFO] [stdout] 525 + start_adress <= u32::MAX as usize, [INFO] [stdout] 526 + "while statement start is too out on the adress space." [INFO] [stdout] 527 + ); [INFO] [stdout] 528 + // the adress where our while statement starts [INFO] [stdout] 529 + let start_adress = start_adress as u32; [INFO] [stdout] 530 + [INFO] [stdout] 531 + // compile the condition [INFO] [stdout] 532 + self.visit_expr(&ws.condition)?; [INFO] [stdout] 533 + [INFO] [stdout] 534 + // if the condition was false, we need to jump over the entire body, which emit the instruction for here. [INFO] [stdout] 535 + self.set_source_pos(ws.while_token.pos); [INFO] [stdout] 536 + let loop_done_adress = self.emit_jump_instruction(Instruction::JumpIfFalse); [INFO] [stdout] 537 + [INFO] [stdout] 538 + // compile the body [INFO] [stdout] 539 + self.visit_block_stmt(&ws.block)?; [INFO] [stdout] 540 + [INFO] [stdout] 541 + // when the body has executed, jump back to the start, so we actually loop. [INFO] [stdout] 542 + self.set_source_pos(ws.block.brace_close.pos); [INFO] [stdout] 543 + self.emit_instruction(Instruction::Jump); [INFO] [stdout] 544 + self.emit_bytes(&start_adress.to_le_bytes()); [INFO] [stdout] 545 + [INFO] [stdout] 546 + // know we know were to jump to, to skip the body, so we patch the first jump. [INFO] [stdout] 547 + self.patch_jump_instruction(loop_done_adress, self.code.len()); [INFO] [stdout] 548 + } [INFO] [stdout] 549 + [INFO] [stdout] 550 + Stmt::ExprStmt(es) => { [INFO] [stdout] 551 + self.visit_expr(&es.expr)?; [INFO] [stdout] 552 + // statements are supposed to have a stack effect of 0, so we pop [INFO] [stdout] 553 + self.emit_instruction(Instruction::Pop); [INFO] [stdout] 554 + } [INFO] [stdout] 555 + [INFO] [stdout] 556 + Stmt::FnDecl(_fn_decl_stmt) => unimplemented!(), [INFO] [stdout] 557 + Stmt::Return(_) => unimplemented!(), [INFO] [stdout] 558 + }; [INFO] [stdout] 559 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:586:27 [INFO] [stdout] | [INFO] [stdout] 586 | pub fn gen_executable<'b>( [INFO] [stdout] | ^^ [INFO] [stdout] 587 | cahn_source_file: String, [INFO] [stdout] 588 | prog: &'b ProgramStmt, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 586 ~ pub fn gen_executable( [INFO] [stdout] 587 | cahn_source_file: String, [INFO] [stdout] 588 ~ prog: &ProgramStmt, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/lexical_analysis/lexer.rs:139:53 [INFO] [stdout] | [INFO] [stdout] 139 | while !self.mmatch('\n') && !self.peek_char().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peek_char().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/compiler/lexical_analysis/lexer.rs:111:28 [INFO] [stdout] | [INFO] [stdout] 111 | Some(c) if c == '#' => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 111 - Some(c) if c == '#' => { [INFO] [stdout] 111 + Some('#') => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RCInterner` [INFO] [stdout] --> src/compiler/string_handling/string_interner.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | RCInterner(Rc::new(Interner { [INFO] [stdout] 39 | | strings: RefCell::new(IntMap::new()), [INFO] [stdout] 40 | | big_string: RefCell::new(String::new()), [INFO] [stdout] 41 | | })) [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 36 + impl Default for RCInterner { [INFO] [stdout] 37 + fn default() -> Self { [INFO] [stdout] 38 + Self::new() [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a, 'b [INFO] [stdout] --> src/compiler/string_handling/string_interner.rs:44:19 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn intern<'a, 'b>(&'a self, str_to_intern: &'b str) -> Atom { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 44 - pub fn intern<'a, 'b>(&'a self, str_to_intern: &'b str) -> Atom { [INFO] [stdout] 44 + pub fn intern(&self, str_to_intern: &str) -> Atom { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / match self.check_advance(*etype) { [INFO] [stdout] 62 | | Some(t) => return Some(t), [INFO] [stdout] 63 | | None => {} [INFO] [stdout] 64 | | } [INFO] [stdout] | |_____________^ help: try: `if let Some(t) = self.check_advance(*etype) { return Some(t) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:256:9 [INFO] [stdout] | [INFO] [stdout] 256 | return Ok(GroupExpr::new(paren_open, expr, paren_close)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 256 - return Ok(GroupExpr::new(paren_open, expr, paren_close)); [INFO] [stdout] 256 + Ok(GroupExpr::new(paren_open, expr, paren_close)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executable/mod.rs:51:39 [INFO] [stdout] | [INFO] [stdout] 51 | fmt::Debug::fmt(&func.fmt(&self), f)?; [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/mem_manager.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | FormatableHeapValue { value: &self, vm } [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/runtime/mem_manager.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / Ok(match self.value.payload { [INFO] [stdout] 38 | | HeapValue::String(ref string) => f.write_str(&string)?, [INFO] [stdout] 39 | | HeapValue::List(ref list) => { [INFO] [stdout] 40 | | f.write_char('[')?; [INFO] [stdout] ... | [INFO] [stdout] 49 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 37 ~ let _: () = match self.value.payload { [INFO] [stdout] 38 + HeapValue::String(ref string) => f.write_str(&string)?, [INFO] [stdout] 39 + HeapValue::List(ref list) => { [INFO] [stdout] 40 + f.write_char('[')?; [INFO] [stdout] 41 + for (index, val) in list.iter().enumerate() { [INFO] [stdout] 42 + fmt::Display::fmt(&val.fmt(self.vm), f)?; [INFO] [stdout] 43 + if index + 1 < list.len() { [INFO] [stdout] 44 + f.write_str(", ")?; [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] 47 + f.write_char(']')?; [INFO] [stdout] 48 + } [INFO] [stdout] 49 + }; [INFO] [stdout] 50 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/mem_manager.rs:38:58 [INFO] [stdout] | [INFO] [stdout] 38 | HeapValue::String(ref string) => f.write_str(&string)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/runtime/mem_manager.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 136 | .map(|val| match val { [INFO] [stdout] | __________________^ [INFO] [stdout] 137 | | Value::Heap(ptr) => Some(*ptr), [INFO] [stdout] 138 | | _ => None, [INFO] [stdout] 139 | | }) [INFO] [stdout] 140 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `filter_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 136 ~ .filter_map(|val| match val { [INFO] [stdout] 137 + Value::Heap(ptr) => Some(*ptr), [INFO] [stdout] 138 + _ => None, [INFO] [stdout] 139 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/runtime/mem_manager.rs:195:22 [INFO] [stdout] | [INFO] [stdout] 195 | .map(|val| match val { [INFO] [stdout] | ______________________^ [INFO] [stdout] 196 | | Value::Heap(ptr) => Some(ptr), [INFO] [stdout] 197 | | _ => None, [INFO] [stdout] 198 | | }) [INFO] [stdout] 199 | | .flatten() [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `filter_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 195 ~ .filter_map(|val| match val { [INFO] [stdout] 196 + Value::Heap(ptr) => Some(ptr), [INFO] [stdout] 197 + _ => None, [INFO] [stdout] 198 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/mem_manager.rs:213:36 [INFO] [stdout] | [INFO] [stdout] 213 | let hash = hash_string(&str); [INFO] [stdout] | ^^^^ help: change this to: `str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/runtime/value.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | / Ok(match self { [INFO] [stdout] 19 | | Value::Nil => f.write_str("Nil")?, [INFO] [stdout] 20 | | Value::Bool(b) => f.write_fmt(format_args!("Bool({})", b))?, [INFO] [stdout] 21 | | Value::Number(num) => f.write_fmt(format_args!("Number({})", num))?, [INFO] [stdout] ... | [INFO] [stdout] 37 | | Value::Heap(ptr) => f.write_fmt(format_args!("HeapPtr({:?})", *ptr))?, [INFO] [stdout] 38 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 18 ~ let _: () = match self { [INFO] [stdout] 19 + Value::Nil => f.write_str("Nil")?, [INFO] [stdout] 20 + Value::Bool(b) => f.write_fmt(format_args!("Bool({})", b))?, [INFO] [stdout] 21 + Value::Number(num) => f.write_fmt(format_args!("Number({})", num))?, [INFO] [stdout] 22 + [INFO] [stdout] 23 + Value::StringLiteral { [INFO] [stdout] 24 + start_index, [INFO] [stdout] 25 + end_index, [INFO] [stdout] 26 + } => f.write_fmt(format_args!( [INFO] [stdout] 27 + "StringLiteral({}..{})", [INFO] [stdout] 28 + start_index, end_index [INFO] [stdout] 29 + ))?, [INFO] [stdout] 30 + [INFO] [stdout] 31 + Value::Function { function_index } => { [INFO] [stdout] 32 + f.write_fmt(format_args!("Format(index: {})", function_index))? [INFO] [stdout] 33 + } [INFO] [stdout] 34 + [INFO] [stdout] 35 + Value::ReturnAdress { ip } => f.write_fmt(format_args!("ReturnAdress({})", ip))?, [INFO] [stdout] 36 + [INFO] [stdout] 37 + Value::Heap(ptr) => f.write_fmt(format_args!("HeapPtr({:?})", *ptr))?, [INFO] [stdout] 38 + }; [INFO] [stdout] 39 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/runtime/value.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / match self { [INFO] [stdout] 45 | | Value::Bool(false) | Value::Nil => false, [INFO] [stdout] 46 | | _ => true, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 44 - match self { [INFO] [stdout] 45 - Value::Bool(false) | Value::Nil => false, [INFO] [stdout] 46 - _ => true, [INFO] [stdout] 47 - } [INFO] [stdout] 44 + !matches!(self, Value::Bool(false) | Value::Nil) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/value.rs:69:55 [INFO] [stdout] | [INFO] [stdout] 69 | let cahn_function = cahn_function.fmt(&self.vm.exec); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.vm.exec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:150:27 [INFO] [stdout] | [INFO] [stdout] 150 | other.fmt(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:160:27 [INFO] [stdout] | [INFO] [stdout] 160 | other.fmt(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:180:63 [INFO] [stdout] | [INFO] [stdout] 180 | let new_string = format!("{}{}", left_val.fmt(&self), right_val.fmt(&self)); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:180:85 [INFO] [stdout] | [INFO] [stdout] 180 | let new_string = format!("{}{}", left_val.fmt(&self), right_val.fmt(&self)); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:185:35 [INFO] [stdout] | [INFO] [stdout] 185 | .alloc_string(&self, new_string); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/runtime/value.rs:1:22 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{self, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/runtime/vm.rs:444:17 [INFO] [stdout] | [INFO] [stdout] 444 | write!(self.stdout.borrow_mut(), "{}\n", val.fmt(self))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 444 - write!(self.stdout.borrow_mut(), "{}\n", val.fmt(self))?; [INFO] [stdout] 444 + writeln!(self.stdout.borrow_mut(), "{}", val.fmt(self))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/runtime/vm.rs:483:21 [INFO] [stdout] | [INFO] [stdout] 483 | / return Err(RuntimeError::TypeError { [INFO] [stdout] 484 | | message: format!( [INFO] [stdout] 485 | | "tried to push an element to a non-list type: '{}'", [INFO] [stdout] 486 | | right.fmt(self) [INFO] [stdout] 487 | | ), [INFO] [stdout] 488 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 483 ~ Err(RuntimeError::TypeError { [INFO] [stdout] 484 + message: format!( [INFO] [stdout] 485 + "tried to push an element to a non-list type: '{}'", [INFO] [stdout] 486 + right.fmt(self) [INFO] [stdout] 487 + ), [INFO] [stdout] 488 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:544:40 [INFO] [stdout] | [INFO] [stdout] 544 | print!("{} ", (*val).fmt(&self)); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:69:38 [INFO] [stdout] | [INFO] [stdout] 69 | fn expect String>(&self, expected: TokenType, message_func: T) -> Result { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 69 | fn expect String>(&self, expected: TokenType, message_func: T) -> Result<'_, Token> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn parse_program(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 80 | pub fn parse_program(&self) -> Result<'_, ProgramStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | fn parse_statement_list(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 86 | fn parse_statement_list(&self) -> Result<'_, StmtList<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:96:26 [INFO] [stdout] | [INFO] [stdout] 96 | fn finish_block_stmt(&self, brace_open: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 96 | fn finish_block_stmt(&self, brace_open: Token) -> Result<'_, BlockStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:104:34 [INFO] [stdout] | [INFO] [stdout] 104 | fn finish_var_decl_statement(&self, var_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 104 | fn finish_var_decl_statement(&self, var_token: Token) -> Result<'_, VarDeclStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:118:23 [INFO] [stdout] | [INFO] [stdout] 118 | fn finish_if_stmt(&self, if_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 118 | fn finish_if_stmt(&self, if_token: Token) -> Result<'_, IfStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 148 | fn finish_while_stmt(&self, while_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 148 | fn finish_while_stmt(&self, while_token: Token) -> Result<'_, WhileStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:160:28 [INFO] [stdout] | [INFO] [stdout] 160 | fn finish_fn_decl_stmt(&self, fn_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 160 | fn finish_fn_decl_stmt(&self, fn_token: Token) -> Result<'_, FnDeclStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:194:33 [INFO] [stdout] | [INFO] [stdout] 194 | fn finish_anyn_fn_decl_expr(&self, fn_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 194 | fn finish_anyn_fn_decl_expr(&self, fn_token: Token) -> Result<'_, AnynFnDeclExpr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | fn parse_statement(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 198 | fn parse_statement(&self) -> Result<'_, Stmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:237:31 [INFO] [stdout] | [INFO] [stdout] 237 | fn finish_print_statement(&self, print_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 237 | fn finish_print_statement(&self, print_token: Token) -> Result<'_, PrintStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:242:32 [INFO] [stdout] | [INFO] [stdout] 242 | fn finish_return_statement(&self, return_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 242 | fn finish_return_statement(&self, return_token: Token) -> Result<'_, ReturnStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:251:32 [INFO] [stdout] | [INFO] [stdout] 251 | fn finish_group_expression(&self, paren_open: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 251 | fn finish_group_expression(&self, paren_open: Token) -> Result<'_, GroupExpr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:259:31 [INFO] [stdout] | [INFO] [stdout] 259 | fn finish_list_expression(&self, bracket_open: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 259 | fn finish_list_expression(&self, bracket_open: Token) -> Result<'_, ListExpr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:297:25 [INFO] [stdout] | [INFO] [stdout] 297 | fn parse_expression(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 297 | fn parse_expression(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | fn parse_assignment(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 301 | fn parse_assignment(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:318:18 [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_and(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_and(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:328:17 [INFO] [stdout] | [INFO] [stdout] 328 | fn parse_or(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 328 | fn parse_or(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:338:25 [INFO] [stdout] | [INFO] [stdout] 338 | fn parse_comparison(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 338 | fn parse_comparison(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:357:28 [INFO] [stdout] | [INFO] [stdout] 357 | fn parse_concatenation(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 357 | fn parse_concatenation(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:367:23 [INFO] [stdout] | [INFO] [stdout] 367 | fn parse_addition(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 367 | fn parse_addition(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:377:29 [INFO] [stdout] | [INFO] [stdout] 377 | fn parse_multiplication(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 377 | fn parse_multiplication(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:392:20 [INFO] [stdout] | [INFO] [stdout] 392 | fn parse_unary(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 392 | fn parse_unary(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:400:23 [INFO] [stdout] | [INFO] [stdout] 400 | fn parse_exponent(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 400 | fn parse_exponent(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:410:19 [INFO] [stdout] | [INFO] [stdout] 410 | fn parse_call(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 410 | fn parse_call(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:476:19 [INFO] [stdout] | [INFO] [stdout] 476 | fn parse_atom(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 476 | fn parse_atom(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_local` is never used [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 54 | impl<'a> CodeGenerator<'a> { [INFO] [stdout] | -------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 142 | fn get_local(&self, index: usize) -> Option<&Local> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `read_u64`, `assert_function`, and `assert_return_address` are never used [INFO] [stdout] --> src/runtime/vm.rs:124:8 [INFO] [stdout] | [INFO] [stdout] 41 | impl<'a> VM<'a> { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 124 | fn read_u64(&mut self) -> u64 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 145 | fn assert_function<'b>(&'b self, val: Value) -> &'a CahnFunction { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 155 | fn assert_return_address(&self, val: Value) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:221:51 [INFO] [stdout] | [INFO] [stdout] 221 | let local = self.get_local_index_by_token(&identifier)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `identifier` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:289:25 [INFO] [stdout] | [INFO] [stdout] 289 | fn add_string_slice<'b>(&mut self, string: &'b str) -> (u32, u32) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 289 - fn add_string_slice<'b>(&mut self, string: &'b str) -> (u32, u32) { [INFO] [stdout] 289 + fn add_string_slice(&mut self, string: &str) -> (u32, u32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(u32, u32)` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:304:39 [INFO] [stdout] | [INFO] [stdout] 304 | Entry::Occupied(entry) => entry.get().clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*entry.get()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:480:9 [INFO] [stdout] | [INFO] [stdout] 480 | / Ok(match stmt { [INFO] [stdout] 481 | | Stmt::Program(ps) => self.visit_program_stmt(ps)?, [INFO] [stdout] 482 | | [INFO] [stdout] 483 | | Stmt::Block(bs) => self.visit_block_stmt(bs)?, [INFO] [stdout] ... | [INFO] [stdout] 557 | | Stmt::Return(_) => unimplemented!(), [INFO] [stdout] 558 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 480 ~ let _: () = match stmt { [INFO] [stdout] 481 + Stmt::Program(ps) => self.visit_program_stmt(ps)?, [INFO] [stdout] 482 + [INFO] [stdout] 483 + Stmt::Block(bs) => self.visit_block_stmt(bs)?, [INFO] [stdout] 484 + [INFO] [stdout] 485 + Stmt::StmtList(sl) => self.visit_stmt_list(sl)?, [INFO] [stdout] 486 + [INFO] [stdout] 487 + Stmt::Print(ps) => { [INFO] [stdout] 488 + self.visit_expr(&ps.inner)?; [INFO] [stdout] 489 + self.set_source_pos(ps.print_token.pos); [INFO] [stdout] 490 + self.emit_instruction(Instruction::Print); [INFO] [stdout] 491 + } [INFO] [stdout] 492 + [INFO] [stdout] 493 + Stmt::VarDecl(vds) => { [INFO] [stdout] 494 + self.visit_expr(&vds.init_expr)?; [INFO] [stdout] 495 + self.set_source_pos(vds.var_token.pos); [INFO] [stdout] 496 + self.declare_local(&vds.identifier.lexeme); [INFO] [stdout] 497 + } [INFO] [stdout] 498 + [INFO] [stdout] 499 + Stmt::If(is) => { [INFO] [stdout] 500 + self.visit_expr(&is.condition)?; [INFO] [stdout] 501 + [INFO] [stdout] 502 + self.set_source_pos(is.if_token.pos); [INFO] [stdout] 503 + let then_jump = self.emit_jump_instruction(Instruction::JumpIfFalse); [INFO] [stdout] 504 + [INFO] [stdout] 505 + self.visit_block_stmt(&is.then_clause)?; [INFO] [stdout] 506 + [INFO] [stdout] 507 + let mut else_jump = None; [INFO] [stdout] 508 + [INFO] [stdout] 509 + if let Some(ref else_token) = is.else_token { [INFO] [stdout] 510 + self.set_source_pos(else_token.pos); [INFO] [stdout] 511 + else_jump = Some(self.emit_jump_instruction(Instruction::Jump)); [INFO] [stdout] 512 + } [INFO] [stdout] 513 + [INFO] [stdout] 514 + self.patch_jump_instruction(then_jump, self.code.len()); [INFO] [stdout] 515 + [INFO] [stdout] 516 + if let Some(else_block) = &is.else_clause { [INFO] [stdout] 517 + self.visit_stmt(else_block)?; [INFO] [stdout] 518 + self.patch_jump_instruction(else_jump.unwrap(), self.code.len()); [INFO] [stdout] 519 + } [INFO] [stdout] 520 + } [INFO] [stdout] 521 + [INFO] [stdout] 522 + Stmt::While(ws) => { [INFO] [stdout] 523 + let start_adress = self.code.len(); [INFO] [stdout] 524 + assert!( [INFO] [stdout] 525 + start_adress <= u32::MAX as usize, [INFO] [stdout] 526 + "while statement start is too out on the adress space." [INFO] [stdout] 527 + ); [INFO] [stdout] 528 + // the adress where our while statement starts [INFO] [stdout] 529 + let start_adress = start_adress as u32; [INFO] [stdout] 530 + [INFO] [stdout] 531 + // compile the condition [INFO] [stdout] 532 + self.visit_expr(&ws.condition)?; [INFO] [stdout] 533 + [INFO] [stdout] 534 + // if the condition was false, we need to jump over the entire body, which emit the instruction for here. [INFO] [stdout] 535 + self.set_source_pos(ws.while_token.pos); [INFO] [stdout] 536 + let loop_done_adress = self.emit_jump_instruction(Instruction::JumpIfFalse); [INFO] [stdout] 537 + [INFO] [stdout] 538 + // compile the body [INFO] [stdout] 539 + self.visit_block_stmt(&ws.block)?; [INFO] [stdout] 540 + [INFO] [stdout] 541 + // when the body has executed, jump back to the start, so we actually loop. [INFO] [stdout] 542 + self.set_source_pos(ws.block.brace_close.pos); [INFO] [stdout] 543 + self.emit_instruction(Instruction::Jump); [INFO] [stdout] 544 + self.emit_bytes(&start_adress.to_le_bytes()); [INFO] [stdout] 545 + [INFO] [stdout] 546 + // know we know were to jump to, to skip the body, so we patch the first jump. [INFO] [stdout] 547 + self.patch_jump_instruction(loop_done_adress, self.code.len()); [INFO] [stdout] 548 + } [INFO] [stdout] 549 + [INFO] [stdout] 550 + Stmt::ExprStmt(es) => { [INFO] [stdout] 551 + self.visit_expr(&es.expr)?; [INFO] [stdout] 552 + // statements are supposed to have a stack effect of 0, so we pop [INFO] [stdout] 553 + self.emit_instruction(Instruction::Pop); [INFO] [stdout] 554 + } [INFO] [stdout] 555 + [INFO] [stdout] 556 + Stmt::FnDecl(_fn_decl_stmt) => unimplemented!(), [INFO] [stdout] 557 + Stmt::Return(_) => unimplemented!(), [INFO] [stdout] 558 + }; [INFO] [stdout] 559 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'b [INFO] [stdout] --> src/compiler/codegen/codegenerator.rs:586:27 [INFO] [stdout] | [INFO] [stdout] 586 | pub fn gen_executable<'b>( [INFO] [stdout] | ^^ [INFO] [stdout] 587 | cahn_source_file: String, [INFO] [stdout] 588 | prog: &'b ProgramStmt, [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 586 ~ pub fn gen_executable( [INFO] [stdout] 587 | cahn_source_file: String, [INFO] [stdout] 588 ~ prog: &ProgramStmt, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/lexical_analysis/lexer.rs:139:53 [INFO] [stdout] | [INFO] [stdout] 139 | while !self.mmatch('\n') && !self.peek_char().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.peek_char().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> src/compiler/lexical_analysis/lexer.rs:111:28 [INFO] [stdout] | [INFO] [stdout] 111 | Some(c) if c == '#' => { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 111 - Some(c) if c == '#' => { [INFO] [stdout] 111 + Some('#') => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RCInterner` [INFO] [stdout] --> src/compiler/string_handling/string_interner.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | RCInterner(Rc::new(Interner { [INFO] [stdout] 39 | | strings: RefCell::new(IntMap::new()), [INFO] [stdout] 40 | | big_string: RefCell::new(String::new()), [INFO] [stdout] 41 | | })) [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 36 + impl Default for RCInterner { [INFO] [stdout] 37 + fn default() -> Self { [INFO] [stdout] 38 + Self::new() [INFO] [stdout] 39 + } [INFO] [stdout] 40 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a, 'b [INFO] [stdout] --> src/compiler/string_handling/string_interner.rs:44:19 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn intern<'a, 'b>(&'a self, str_to_intern: &'b str) -> Atom { [INFO] [stdout] | ^^ ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 44 - pub fn intern<'a, 'b>(&'a self, str_to_intern: &'b str) -> Atom { [INFO] [stdout] 44 + pub fn intern(&self, str_to_intern: &str) -> Atom { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:61:13 [INFO] [stdout] | [INFO] [stdout] 61 | / match self.check_advance(*etype) { [INFO] [stdout] 62 | | Some(t) => return Some(t), [INFO] [stdout] 63 | | None => {} [INFO] [stdout] 64 | | } [INFO] [stdout] | |_____________^ help: try: `if let Some(t) = self.check_advance(*etype) { return Some(t) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:256:9 [INFO] [stdout] | [INFO] [stdout] 256 | return Ok(GroupExpr::new(paren_open, expr, paren_close)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 256 - return Ok(GroupExpr::new(paren_open, expr, paren_close)); [INFO] [stdout] 256 + Ok(GroupExpr::new(paren_open, expr, paren_close)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/executable/mod.rs:51:39 [INFO] [stdout] | [INFO] [stdout] 51 | fmt::Debug::fmt(&func.fmt(&self), f)?; [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/mem_manager.rs:26:38 [INFO] [stdout] | [INFO] [stdout] 26 | FormatableHeapValue { value: &self, vm } [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/runtime/mem_manager.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / Ok(match self.value.payload { [INFO] [stdout] 38 | | HeapValue::String(ref string) => f.write_str(&string)?, [INFO] [stdout] 39 | | HeapValue::List(ref list) => { [INFO] [stdout] 40 | | f.write_char('[')?; [INFO] [stdout] ... | [INFO] [stdout] 49 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 37 ~ let _: () = match self.value.payload { [INFO] [stdout] 38 + HeapValue::String(ref string) => f.write_str(&string)?, [INFO] [stdout] 39 + HeapValue::List(ref list) => { [INFO] [stdout] 40 + f.write_char('[')?; [INFO] [stdout] 41 + for (index, val) in list.iter().enumerate() { [INFO] [stdout] 42 + fmt::Display::fmt(&val.fmt(self.vm), f)?; [INFO] [stdout] 43 + if index + 1 < list.len() { [INFO] [stdout] 44 + f.write_str(", ")?; [INFO] [stdout] 45 + } [INFO] [stdout] 46 + } [INFO] [stdout] 47 + f.write_char(']')?; [INFO] [stdout] 48 + } [INFO] [stdout] 49 + }; [INFO] [stdout] 50 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/mem_manager.rs:38:58 [INFO] [stdout] | [INFO] [stdout] 38 | HeapValue::String(ref string) => f.write_str(&string)?, [INFO] [stdout] | ^^^^^^^ help: change this to: `string` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/runtime/mem_manager.rs:136:18 [INFO] [stdout] | [INFO] [stdout] 136 | .map(|val| match val { [INFO] [stdout] | __________________^ [INFO] [stdout] 137 | | Value::Heap(ptr) => Some(*ptr), [INFO] [stdout] 138 | | _ => None, [INFO] [stdout] 139 | | }) [INFO] [stdout] 140 | | .flatten() [INFO] [stdout] | |__________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `filter_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 136 ~ .filter_map(|val| match val { [INFO] [stdout] 137 + Value::Heap(ptr) => Some(*ptr), [INFO] [stdout] 138 + _ => None, [INFO] [stdout] 139 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/runtime/mem_manager.rs:195:22 [INFO] [stdout] | [INFO] [stdout] 195 | .map(|val| match val { [INFO] [stdout] | ______________________^ [INFO] [stdout] 196 | | Value::Heap(ptr) => Some(ptr), [INFO] [stdout] 197 | | _ => None, [INFO] [stdout] 198 | | }) [INFO] [stdout] 199 | | .flatten() [INFO] [stdout] | |______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] help: try replacing `map` with `filter_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 195 ~ .filter_map(|val| match val { [INFO] [stdout] 196 + Value::Heap(ptr) => Some(ptr), [INFO] [stdout] 197 + _ => None, [INFO] [stdout] 198 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/mem_manager.rs:213:36 [INFO] [stdout] | [INFO] [stdout] 213 | let hash = hash_string(&str); [INFO] [stdout] | ^^^^ help: change this to: `str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/runtime/value.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | / Ok(match self { [INFO] [stdout] 19 | | Value::Nil => f.write_str("Nil")?, [INFO] [stdout] 20 | | Value::Bool(b) => f.write_fmt(format_args!("Bool({})", b))?, [INFO] [stdout] 21 | | Value::Number(num) => f.write_fmt(format_args!("Number({})", num))?, [INFO] [stdout] ... | [INFO] [stdout] 37 | | Value::Heap(ptr) => f.write_fmt(format_args!("HeapPtr({:?})", *ptr))?, [INFO] [stdout] 38 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 18 ~ let _: () = match self { [INFO] [stdout] 19 + Value::Nil => f.write_str("Nil")?, [INFO] [stdout] 20 + Value::Bool(b) => f.write_fmt(format_args!("Bool({})", b))?, [INFO] [stdout] 21 + Value::Number(num) => f.write_fmt(format_args!("Number({})", num))?, [INFO] [stdout] 22 + [INFO] [stdout] 23 + Value::StringLiteral { [INFO] [stdout] 24 + start_index, [INFO] [stdout] 25 + end_index, [INFO] [stdout] 26 + } => f.write_fmt(format_args!( [INFO] [stdout] 27 + "StringLiteral({}..{})", [INFO] [stdout] 28 + start_index, end_index [INFO] [stdout] 29 + ))?, [INFO] [stdout] 30 + [INFO] [stdout] 31 + Value::Function { function_index } => { [INFO] [stdout] 32 + f.write_fmt(format_args!("Format(index: {})", function_index))? [INFO] [stdout] 33 + } [INFO] [stdout] 34 + [INFO] [stdout] 35 + Value::ReturnAdress { ip } => f.write_fmt(format_args!("ReturnAdress({})", ip))?, [INFO] [stdout] 36 + [INFO] [stdout] 37 + Value::Heap(ptr) => f.write_fmt(format_args!("HeapPtr({:?})", *ptr))?, [INFO] [stdout] 38 + }; [INFO] [stdout] 39 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/runtime/value.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / match self { [INFO] [stdout] 45 | | Value::Bool(false) | Value::Nil => false, [INFO] [stdout] 46 | | _ => true, [INFO] [stdout] 47 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 44 - match self { [INFO] [stdout] 45 - Value::Bool(false) | Value::Nil => false, [INFO] [stdout] 46 - _ => true, [INFO] [stdout] 47 - } [INFO] [stdout] 44 + !matches!(self, Value::Bool(false) | Value::Nil) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/value.rs:69:55 [INFO] [stdout] | [INFO] [stdout] 69 | let cahn_function = cahn_function.fmt(&self.vm.exec); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.vm.exec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:150:27 [INFO] [stdout] | [INFO] [stdout] 150 | other.fmt(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:160:27 [INFO] [stdout] | [INFO] [stdout] 160 | other.fmt(&self) [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:180:63 [INFO] [stdout] | [INFO] [stdout] 180 | let new_string = format!("{}{}", left_val.fmt(&self), right_val.fmt(&self)); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:180:85 [INFO] [stdout] | [INFO] [stdout] 180 | let new_string = format!("{}{}", left_val.fmt(&self), right_val.fmt(&self)); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:185:35 [INFO] [stdout] | [INFO] [stdout] 185 | .alloc_string(&self, new_string); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `write!()` with a format string that ends in a single newline [INFO] [stdout] --> src/runtime/vm.rs:444:17 [INFO] [stdout] | [INFO] [stdout] 444 | write!(self.stdout.borrow_mut(), "{}\n", val.fmt(self))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stdout] = note: `#[warn(clippy::write_with_newline)]` on by default [INFO] [stdout] help: use `writeln!` instead [INFO] [stdout] | [INFO] [stdout] 444 - write!(self.stdout.borrow_mut(), "{}\n", val.fmt(self))?; [INFO] [stdout] 444 + writeln!(self.stdout.borrow_mut(), "{}", val.fmt(self))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/runtime/vm.rs:483:21 [INFO] [stdout] | [INFO] [stdout] 483 | / return Err(RuntimeError::TypeError { [INFO] [stdout] 484 | | message: format!( [INFO] [stdout] 485 | | "tried to push an element to a non-list type: '{}'", [INFO] [stdout] 486 | | right.fmt(self) [INFO] [stdout] 487 | | ), [INFO] [stdout] 488 | | }); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 483 ~ Err(RuntimeError::TypeError { [INFO] [stdout] 484 + message: format!( [INFO] [stdout] 485 + "tried to push an element to a non-list type: '{}'", [INFO] [stdout] 486 + right.fmt(self) [INFO] [stdout] 487 + ), [INFO] [stdout] 488 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/runtime/vm.rs:544:40 [INFO] [stdout] | [INFO] [stdout] 544 | print!("{} ", (*val).fmt(&self)); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:69:38 [INFO] [stdout] | [INFO] [stdout] 69 | fn expect String>(&self, expected: TokenType, message_func: T) -> Result { [INFO] [stdout] | ^^^^^ the lifetime is elided here ^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 69 | fn expect String>(&self, expected: TokenType, message_func: T) -> Result<'_, Token> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:80:26 [INFO] [stdout] | [INFO] [stdout] 80 | pub fn parse_program(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 80 | pub fn parse_program(&self) -> Result<'_, ProgramStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:86:29 [INFO] [stdout] | [INFO] [stdout] 86 | fn parse_statement_list(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 86 | fn parse_statement_list(&self) -> Result<'_, StmtList<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:96:26 [INFO] [stdout] | [INFO] [stdout] 96 | fn finish_block_stmt(&self, brace_open: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 96 | fn finish_block_stmt(&self, brace_open: Token) -> Result<'_, BlockStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:104:34 [INFO] [stdout] | [INFO] [stdout] 104 | fn finish_var_decl_statement(&self, var_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 104 | fn finish_var_decl_statement(&self, var_token: Token) -> Result<'_, VarDeclStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:118:23 [INFO] [stdout] | [INFO] [stdout] 118 | fn finish_if_stmt(&self, if_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 118 | fn finish_if_stmt(&self, if_token: Token) -> Result<'_, IfStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 148 | fn finish_while_stmt(&self, while_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 148 | fn finish_while_stmt(&self, while_token: Token) -> Result<'_, WhileStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:160:28 [INFO] [stdout] | [INFO] [stdout] 160 | fn finish_fn_decl_stmt(&self, fn_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 160 | fn finish_fn_decl_stmt(&self, fn_token: Token) -> Result<'_, FnDeclStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:194:33 [INFO] [stdout] | [INFO] [stdout] 194 | fn finish_anyn_fn_decl_expr(&self, fn_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 194 | fn finish_anyn_fn_decl_expr(&self, fn_token: Token) -> Result<'_, AnynFnDeclExpr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:198:24 [INFO] [stdout] | [INFO] [stdout] 198 | fn parse_statement(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 198 | fn parse_statement(&self) -> Result<'_, Stmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:237:31 [INFO] [stdout] | [INFO] [stdout] 237 | fn finish_print_statement(&self, print_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 237 | fn finish_print_statement(&self, print_token: Token) -> Result<'_, PrintStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:242:32 [INFO] [stdout] | [INFO] [stdout] 242 | fn finish_return_statement(&self, return_token: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 242 | fn finish_return_statement(&self, return_token: Token) -> Result<'_, ReturnStmt<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:251:32 [INFO] [stdout] | [INFO] [stdout] 251 | fn finish_group_expression(&self, paren_open: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 251 | fn finish_group_expression(&self, paren_open: Token) -> Result<'_, GroupExpr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.70s [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:259:31 [INFO] [stdout] | [INFO] [stdout] 259 | fn finish_list_expression(&self, bracket_open: Token) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 259 | fn finish_list_expression(&self, bracket_open: Token) -> Result<'_, ListExpr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:297:25 [INFO] [stdout] | [INFO] [stdout] 297 | fn parse_expression(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 297 | fn parse_expression(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | fn parse_assignment(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 301 | fn parse_assignment(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:318:18 [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_and(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 318 | fn parse_and(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:328:17 [INFO] [stdout] | [INFO] [stdout] 328 | fn parse_or(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 328 | fn parse_or(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:338:25 [INFO] [stdout] | [INFO] [stdout] 338 | fn parse_comparison(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 338 | fn parse_comparison(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:357:28 [INFO] [stdout] | [INFO] [stdout] 357 | fn parse_concatenation(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 357 | fn parse_concatenation(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:367:23 [INFO] [stdout] | [INFO] [stdout] 367 | fn parse_addition(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 367 | fn parse_addition(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:377:29 [INFO] [stdout] | [INFO] [stdout] 377 | fn parse_multiplication(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 377 | fn parse_multiplication(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:392:20 [INFO] [stdout] | [INFO] [stdout] 392 | fn parse_unary(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 392 | fn parse_unary(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:400:23 [INFO] [stdout] | [INFO] [stdout] 400 | fn parse_exponent(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 400 | fn parse_exponent(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:410:19 [INFO] [stdout] | [INFO] [stdout] 410 | fn parse_call(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 410 | fn parse_call(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/compiler/syntactical_analysis/parser.rs:476:19 [INFO] [stdout] | [INFO] [stdout] 476 | fn parse_atom(&self) -> Result> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 476 | fn parse_atom(&self) -> Result<'_, Expr<'a>> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "e978cf1206bb444b413a94ab7ef2cbe585c784889694655fca48bd3a2f586c2f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e978cf1206bb444b413a94ab7ef2cbe585c784889694655fca48bd3a2f586c2f", kill_on_drop: false }` [INFO] [stdout] e978cf1206bb444b413a94ab7ef2cbe585c784889694655fca48bd3a2f586c2f