[INFO] cloning repository https://github.com/Mauw94/lumi_v3 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Mauw94/lumi_v3" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMauw94%2Flumi_v3", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMauw94%2Flumi_v3'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] cf3b5cf16fd9c24cc3c5c463c760b53adfadbeba [INFO] linting Mauw94/lumi_v3 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMauw94%2Flumi_v3" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Mauw94/lumi_v3 [INFO] finished tweaking git repo https://github.com/Mauw94/lumi_v3 [INFO] tweaked toml for git repo https://github.com/Mauw94/lumi_v3 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Mauw94/lumi_v3 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/Mauw94/lumi_v3 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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2024 which implies `resolver = "3"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2024 resolver, specify `workspace.resolver = "3"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded clap v4.5.41 [INFO] [stderr] Downloaded clap_builder v4.5.41 [INFO] [stderr] Downloaded serde_json v1.0.141 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] aca98ee523b9f23b5f7de3972acaadfeefa23befd7ad3ca32f5d57f535a7c2ba [INFO] running `Command { std: "docker" "start" "-a" "aca98ee523b9f23b5f7de3972acaadfeefa23befd7ad3ca32f5d57f535a7c2ba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aca98ee523b9f23b5f7de3972acaadfeefa23befd7ad3ca32f5d57f535a7c2ba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aca98ee523b9f23b5f7de3972acaadfeefa23befd7ad3ca32f5d57f535a7c2ba", kill_on_drop: false }` [INFO] [stdout] aca98ee523b9f23b5f7de3972acaadfeefa23befd7ad3ca32f5d57f535a7c2ba [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] b8bfe004c3ec77d8c9071e2b549f9faa6f2171d903b055ae0b8db8721c119d06 [INFO] running `Command { std: "docker" "start" "-a" "b8bfe004c3ec77d8c9071e2b549f9faa6f2171d903b055ae0b8db8721c119d06", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2024 which implies `resolver = "3"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2024 resolver, specify `workspace.resolver = "3"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling serde_json v1.0.141 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking half v2.6.0 [INFO] [stderr] Checking clap_builder v4.5.41 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking clap v4.5.41 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking lumi_lexer v0.1.0 (/opt/rustwide/workdir/crates/lumi_lexer) [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/lumi_lexer/src/lexer.rs:189:20 [INFO] [stdout] | [INFO] [stdout] 189 | if c >= '0' && c <= '7' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='7').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking lumi_ast v0.1.0 (/opt/rustwide/workdir/crates/lumi_ast) [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stdout] warning: unused variable: `if_statement` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | Node::IfStatement(if_statement) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_statement` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `block_statement` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:25:34 [INFO] [stdout] | [INFO] [stdout] 25 | Node::BlockStatement(block_statement) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_statement` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function_declaration` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:26:39 [INFO] [stdout] | [INFO] [stdout] 26 | Node::FunctionDeclaration(function_declaration) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function_declaration` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `call_expression` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:27:34 [INFO] [stdout] | [INFO] [stdout] 27 | Node::CallExpression(call_expression) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_call_expression` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `for_statement` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:28:32 [INFO] [stdout] | [INFO] [stdout] 28 | Node::ForStatement(for_statement) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_for_statement` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> crates/lumi_ast/src/node.rs:110:40 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn get_default_value(var_type: &Box) -> Result { [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `if_statement` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | Node::IfStatement(if_statement) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_if_statement` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `block_statement` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:25:34 [INFO] [stdout] | [INFO] [stdout] 25 | Node::BlockStatement(block_statement) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_statement` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `function_declaration` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:26:39 [INFO] [stdout] | [INFO] [stdout] 26 | Node::FunctionDeclaration(function_declaration) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_function_declaration` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `call_expression` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:27:34 [INFO] [stdout] | [INFO] [stdout] 27 | Node::CallExpression(call_expression) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_call_expression` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `for_statement` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:28:32 [INFO] [stdout] | [INFO] [stdout] 28 | Node::ForStatement(for_statement) => todo!(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_for_statement` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> crates/lumi_ast/src/node.rs:110:40 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn get_default_value(var_type: &Box) -> Result { [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NodeCounter` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | / pub fn new() -> Self { [INFO] [stdout] 68 | | Self { count: 0 } [INFO] [stdout] 69 | | } [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] 66 + impl Default for NodeCounter { [INFO] [stdout] 67 + fn default() -> Self { [INFO] [stdout] 68 + Self::new() [INFO] [stdout] 69 + } [INFO] [stdout] 70 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking lumi_parser v0.1.0 (/opt/rustwide/workdir/crates/lumi_parser) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `NodeCounter` [INFO] [stdout] --> crates/lumi_ast/src/visitor.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | / pub fn new() -> Self { [INFO] [stdout] 68 | | Self { count: 0 } [INFO] [stdout] 69 | | } [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] 66 + impl Default for NodeCounter { [INFO] [stdout] 67 + fn default() -> Self { [INFO] [stdout] 68 + Self::new() [INFO] [stdout] 69 + } [INFO] [stdout] 70 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:322:17 [INFO] [stdout] | [INFO] [stdout] 322 | init: init, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `init` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub enum RecoveryStrategy { [INFO] [stdout] | ---------------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 16 | SkipUntilBlock, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | SkipUntilFunction, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | SkipUntilClass, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | SkipUntilModule, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | InsertToken(String), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | ReplaceToken(String), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | DeleteToken, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RecoveryStrategy` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `previous_token` and `recovery_tokens` are never read [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct RecoveryContext { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 47 | pub previous_token: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub recovery_tokens: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RecoveryContext` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `with_recovery_tokens`, `is_recovery_token`, and `current_position` are never used [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:99:12 [INFO] [stdout] | [INFO] [stdout] 84 | impl RecoveryContext { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 99 | pub fn with_recovery_tokens(mut self, tokens: Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub fn is_recovery_token(&self, token: &Token) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 159 | pub fn current_position(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `has_errors`, `clear_errors`, `errors`, and `error_count` are never used [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:199:12 [INFO] [stdout] | [INFO] [stdout] 175 | impl ErrorRecovery { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn has_errors(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 204 | pub fn clear_errors(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 210 | pub fn errors(&self) -> &[ParserError] { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 215 | pub fn error_count(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | return Ok(Node::Identifier(name)); [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] 350 - return Ok(Node::Identifier(name)); [INFO] [stdout] 350 + Ok(Node::Identifier(name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / return Ok(Node::AssignmentExpression(AssignmentExpression { [INFO] [stdout] 390 | | left: Box::new(left), [INFO] [stdout] 391 | | operator, [INFO] [stdout] 392 | | right, [INFO] [stdout] 393 | | span: Some(span), [INFO] [stdout] 394 | | })); [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] 389 ~ Ok(Node::AssignmentExpression(AssignmentExpression { [INFO] [stdout] 390 + left: Box::new(left), [INFO] [stdout] 391 + operator, [INFO] [stdout] 392 + right, [INFO] [stdout] 393 + span: Some(span), [INFO] [stdout] 394 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | return Ok(left); [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] 396 - return Ok(left); [INFO] [stdout] 396 + Ok(left) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:542:9 [INFO] [stdout] | [INFO] [stdout] 542 | / loop { [INFO] [stdout] 543 | | if let Some(token) = &self.current { [INFO] [stdout] 544 | | match &token.kind { [INFO] [stdout] ... | [INFO] [stdout] 604 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(token) = &self.current { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:821:16 [INFO] [stdout] | [INFO] [stdout] 821 | || self [INFO] [stdout] | ________________^ [INFO] [stdout] 822 | | .current [INFO] [stdout] 823 | | .as_ref() [INFO] [stdout] 824 | | .map_or(false, |t| t.kind == TokenKind::Eof) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 824 - .map_or(false, |t| t.kind == TokenKind::Eof) [INFO] [stdout] 824 + .is_some_and(|t| t.kind == TokenKind::Eof) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking lumi_bytecode v0.1.0 (/opt/rustwide/workdir/crates/lumi_bytecode) [INFO] [stderr] Checking lumi_semantic v0.1.0 (/opt/rustwide/workdir/crates/lumi_semantic) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | line: line, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `instructions` is never used [INFO] [stdout] --> crates/lumi_bytecode/src/statements/control_flow.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait ControlFlowCore { [INFO] [stdout] | --------------- method in this trait [INFO] [stdout] 11 | fn instructions(&mut self) -> &mut Vec; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:113:17 [INFO] [stdout] | [INFO] [stdout] 113 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | line: line, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `line` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BytecodeGenerator` [INFO] [stdout] --> crates/lumi_bytecode/src/generator.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | BytecodeGenerator { [INFO] [stdout] 34 | | constants: ConstantPool::default(), [INFO] [stdout] 35 | | instructions: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [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] 31 + impl Default for BytecodeGenerator { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/lumi_bytecode/src/generator.rs:73:37 [INFO] [stdout] | [INFO] [stdout] 73 | self.visit_node(&stmt); [INFO] [stdout] | ^^^^^ help: change this to: `stmt` [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: method `instructions` is never used [INFO] [stdout] --> crates/lumi_bytecode/src/statements/control_flow.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 10 | pub trait ControlFlowCore { [INFO] [stdout] | --------------- method in this trait [INFO] [stdout] 11 | fn instructions(&mut self) -> &mut Vec; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> crates/lumi_bytecode/src/statements/function.rs:34:27 [INFO] [stdout] | [INFO] [stdout] 34 | let fn_name = if let Some(node) = &decl.id { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 35 | | Some(node.name()) [INFO] [stdout] 36 | | } else { [INFO] [stdout] 37 | | None [INFO] [stdout] 38 | | }; [INFO] [stdout] | |_____________^ help: try: `decl.id.as_ref().map(|node| node.name())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/lumi_bytecode/src/statements/function.rs:63:41 [INFO] [stdout] | [INFO] [stdout] 63 | std::mem::swap(&mut old_locals, &mut self.symbol_table()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.symbol_table()` [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: you should consider adding a `Default` implementation for `BytecodeGenerator` [INFO] [stdout] --> crates/lumi_bytecode/src/generator.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | BytecodeGenerator { [INFO] [stdout] 34 | | constants: ConstantPool::default(), [INFO] [stdout] 35 | | instructions: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 41 | | } [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] 31 + impl Default for BytecodeGenerator { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/lumi_bytecode/src/generator.rs:73:37 [INFO] [stdout] | [INFO] [stdout] 73 | self.visit_node(&stmt); [INFO] [stdout] | ^^^^^ help: change this to: `stmt` [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: manual implementation of `Option::map` [INFO] [stdout] --> crates/lumi_bytecode/src/statements/function.rs:34:27 [INFO] [stdout] | [INFO] [stdout] 34 | let fn_name = if let Some(node) = &decl.id { [INFO] [stdout] | ___________________________^ [INFO] [stdout] 35 | | Some(node.name()) [INFO] [stdout] 36 | | } else { [INFO] [stdout] 37 | | None [INFO] [stdout] 38 | | }; [INFO] [stdout] | |_____________^ help: try: `decl.id.as_ref().map(|node| node.name())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/lumi_bytecode/src/statements/function.rs:63:41 [INFO] [stdout] | [INFO] [stdout] 63 | std::mem::swap(&mut old_locals, &mut self.symbol_table()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.symbol_table()` [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] [stderr] Checking lumi_vm v0.1.0 (/opt/rustwide/workdir/crates/lumi_vm) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_vm/src/vm.rs:243:25 [INFO] [stdout] | [INFO] [stdout] 243 | locals: locals, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `locals` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_vm/src/vm.rs:243:25 [INFO] [stdout] | [INFO] [stdout] 243 | locals: locals, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `locals` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Frame` [INFO] [stdout] --> crates/lumi_vm/src/frame.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / pub fn new() -> Self { [INFO] [stdout] 18 | | Frame { [INFO] [stdout] 19 | | return_ip: 0, [INFO] [stdout] 20 | | base_pointer: 0, [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [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] 16 + impl Default for Frame { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Heap` [INFO] [stdout] --> crates/lumi_vm/src/heap.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / pub fn new() -> Self { [INFO] [stdout] 58 | | Heap { [INFO] [stdout] 59 | | entries: Vec::new(), [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 56 + impl Default for Heap { [INFO] [stdout] 57 + fn default() -> Self { [INFO] [stdout] 58 + Self::new() [INFO] [stdout] 59 + } [INFO] [stdout] 60 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Stack` [INFO] [stdout] --> crates/lumi_vm/src/stack.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Stack { [INFO] [stdout] 15 | | values: Vec::new(), [INFO] [stdout] 16 | | frames: Vec::new(), [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for Stack { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `value::Value` [INFO] [stdout] --> crates/lumi_vm/src/value.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub fn to_string(&self) -> String { [INFO] [stdout] 40 | | match self { [INFO] [stdout] 41 | | Value::Number(n) => n.to_string(), [INFO] [stdout] 42 | | Value::String(s) => s.clone(), [INFO] [stdout] ... | [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `value::Value` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Vm` [INFO] [stdout] --> crates/lumi_vm/src/vm.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn new() -> Self { [INFO] [stdout] 28 | | Vm { [INFO] [stdout] 29 | | env: Rc::new(RefCell::new(Env::new(None))), [INFO] [stdout] 30 | | stack: Stack::new(), [INFO] [stdout] ... | [INFO] [stdout] 37 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for Vm { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Frame` [INFO] [stdout] --> crates/lumi_vm/src/frame.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / pub fn new() -> Self { [INFO] [stdout] 18 | | Frame { [INFO] [stdout] 19 | | return_ip: 0, [INFO] [stdout] 20 | | base_pointer: 0, [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [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] 16 + impl Default for Frame { [INFO] [stdout] 17 + fn default() -> Self { [INFO] [stdout] 18 + Self::new() [INFO] [stdout] 19 + } [INFO] [stdout] 20 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Heap` [INFO] [stdout] --> crates/lumi_vm/src/heap.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / pub fn new() -> Self { [INFO] [stdout] 58 | | Heap { [INFO] [stdout] 59 | | entries: Vec::new(), [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 56 + impl Default for Heap { [INFO] [stdout] 57 + fn default() -> Self { [INFO] [stdout] 58 + Self::new() [INFO] [stdout] 59 + } [INFO] [stdout] 60 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Stack` [INFO] [stdout] --> crates/lumi_vm/src/stack.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Stack { [INFO] [stdout] 15 | | values: Vec::new(), [INFO] [stdout] 16 | | frames: Vec::new(), [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 12 + impl Default for Stack { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `value::Value` [INFO] [stdout] --> crates/lumi_vm/src/value.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub fn to_string(&self) -> String { [INFO] [stdout] 40 | | match self { [INFO] [stdout] 41 | | Value::Number(n) => n.to_string(), [INFO] [stdout] 42 | | Value::String(s) => s.clone(), [INFO] [stdout] ... | [INFO] [stdout] 50 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `value::Value` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Vm` [INFO] [stdout] --> crates/lumi_vm/src/vm.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn new() -> Self { [INFO] [stdout] 28 | | Vm { [INFO] [stdout] 29 | | env: Rc::new(RefCell::new(Env::new(None))), [INFO] [stdout] 30 | | stack: Stack::new(), [INFO] [stdout] ... | [INFO] [stdout] 37 | | } [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] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for Vm { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/lumi_vm/src/vm.rs:253:34 [INFO] [stdout] | [INFO] [stdout] 253 | let ret = if self.stack.values.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.stack.values.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> crates/lumi_vm/src/vm.rs:253:34 [INFO] [stdout] | [INFO] [stdout] 253 | let ret = if self.stack.values.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.stack.values.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `functions` and `scope_type` are never read [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Scope { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 12 | functions: HashMap, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | scope_type: ScopeType, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Scope` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `line` are never read [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct VariableInfo { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 24 | /// Variable name [INFO] [stdout] 25 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | pub line: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `VariableInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `param_types`, `return_type`, `is_method`, and `line` are never read [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct FunctionInfo { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 43 | /// Function name [INFO] [stdout] 44 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub param_types: Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub return_type: Type, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub is_method: bool, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub line: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Function`, `Class`, and `Module` are never constructed [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 61 | pub enum ScopeType { [INFO] [stdout] | --------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 66 | Function, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | Class, [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 75 | Module, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ScopeType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:175:12 [INFO] [stdout] | [INFO] [stdout] 78 | impl Scope { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 175 | pub fn is_variable_declared(&self, name: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 189 | pub fn declare_function( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 215 | pub fn get_function(&self, name: &str) -> Option<&FunctionInfo> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 222 | pub fn is_function_declared(&self, name: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 231 | pub fn scope_type(&self) -> &ScopeType { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 236 | pub fn get_local_variables(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 241 | pub fn get_local_functions(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 246 | pub fn is_function_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn is_block_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 256 | pub fn is_global_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statement with no effect [INFO] [stdout] --> crates/lumi_vm/tests/vm_tests.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / r#" [INFO] [stdout] 60 | | fn test(x, y) { [INFO] [stdout] 61 | | x + y; [INFO] [stdout] ... | [INFO] [stdout] 64 | | test(1, 2); [INFO] [stdout] 65 | | "#; [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `common_type`, `is_primitive`, and `is_object` are never used [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl Type { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn common_type(&self, other: &Type) -> Type { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | pub fn is_primitive(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn is_object(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_declared` and `update_type` are never used [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 149 | impl TypeEnvironment { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 167 | pub fn is_declared(&self, name: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 172 | pub fn update_type(&mut self, name: &str, type_info: Type) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SemanticAnalyzer` [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | let mut analyzer = Self { [INFO] [stdout] 24 | | scope_stack: Vec::new(), [INFO] [stdout] 25 | | errors: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 30 | | analyzer [INFO] [stdout] 31 | | } [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] 20 + impl Default for SemanticAnalyzer { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:108:70 [INFO] [stdout] | [INFO] [stdout] 108 | ... position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:121:62 [INFO] [stdout] | [INFO] [stdout] 121 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:132:62 [INFO] [stdout] | [INFO] [stdout] 132 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:231:62 [INFO] [stdout] | [INFO] [stdout] 231 | position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:237:58 [INFO] [stdout] | [INFO] [stdout] 237 | position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:248:70 [INFO] [stdout] | [INFO] [stdout] 248 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:257:70 [INFO] [stdout] | [INFO] [stdout] 257 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:266:70 [INFO] [stdout] | [INFO] [stdout] 266 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:273:66 [INFO] [stdout] | [INFO] [stdout] 273 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:313:54 [INFO] [stdout] | [INFO] [stdout] 313 | position: stmt.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:370:49 [INFO] [stdout] | [INFO] [stdout] 370 | position: span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:384:19 [INFO] [stdout] | [INFO] [stdout] 384 | var_type: &Box, [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 387 | / return match &**var_type { [INFO] [stdout] 388 | | Node::Identifier(id) => match id.to_string().as_str() { [INFO] [stdout] 389 | | "int" => Ok(Type::Number), [INFO] [stdout] ... | [INFO] [stdout] 406 | | }; [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] 387 ~ match &**var_type { [INFO] [stdout] 388 + Node::Identifier(id) => match id.to_string().as_str() { [INFO] [stdout] 389 + "int" => Ok(Type::Number), [INFO] [stdout] 390 + // "float" => Some(Type::Float), // TODO: implement when adding float type [INFO] [stdout] 391 + "str" => Ok(Type::String), [INFO] [stdout] 392 + "bool" => Ok(Type::Boolean), [INFO] [stdout] 393 + // Add more types as needed [INFO] [stdout] 394 + _ => Err(SemanticError::InvalidType { [INFO] [stdout] 395 + type_name: id.to_string(), [INFO] [stdout] 396 + position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] 397 + }), // Handle unknown types [INFO] [stdout] 398 + }, [INFO] [stdout] 399 + _ => { [INFO] [stdout] 400 + // Handle complex types or type expressions [INFO] [stdout] 401 + Err(SemanticError::InvalidType { [INFO] [stdout] 402 + type_name: format!("{:?}", var_type), [INFO] [stdout] 403 + position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] 404 + }) [INFO] [stdout] 405 + } [INFO] [stdout] 406 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:396:58 [INFO] [stdout] | [INFO] [stdout] 396 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `functions` and `scope_type` are never read [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Scope { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 12 | functions: HashMap, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | scope_type: ScopeType, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Scope` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `line` are never read [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct VariableInfo { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 24 | /// Variable name [INFO] [stdout] 25 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 37 | pub line: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `VariableInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `param_types`, `return_type`, `is_method`, and `line` are never read [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct FunctionInfo { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 43 | /// Function name [INFO] [stdout] 44 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub param_types: Vec, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub return_type: Type, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub is_method: bool, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub line: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FunctionInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Function`, `Class`, and `Module` are never constructed [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:66:5 [INFO] [stdout] | [INFO] [stdout] 61 | pub enum ScopeType { [INFO] [stdout] | --------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 66 | Function, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 72 | Class, [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 75 | Module, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ScopeType` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:175:12 [INFO] [stdout] | [INFO] [stdout] 78 | impl Scope { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 175 | pub fn is_variable_declared(&self, name: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 189 | pub fn declare_function( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 215 | pub fn get_function(&self, name: &str) -> Option<&FunctionInfo> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 222 | pub fn is_function_declared(&self, name: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 231 | pub fn scope_type(&self) -> &ScopeType { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 236 | pub fn get_local_variables(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 241 | pub fn get_local_functions(&self) -> &HashMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 246 | pub fn is_function_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 251 | pub fn is_block_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 256 | pub fn is_global_scope(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `common_type`, `is_primitive`, and `is_object` are never used [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:78:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl Type { [INFO] [stdout] | --------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 78 | pub fn common_type(&self, other: &Type) -> Type { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 89 | pub fn is_primitive(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 102 | pub fn is_object(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_declared` and `update_type` are never used [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 149 | impl TypeEnvironment { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 167 | pub fn is_declared(&self, name: &str) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 172 | pub fn update_type(&mut self, name: &str, type_info: Type) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:403:58 [INFO] [stdout] | [INFO] [stdout] 403 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SemanticAnalyzer` [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn new() -> Self { [INFO] [stdout] 23 | | let mut analyzer = Self { [INFO] [stdout] 24 | | scope_stack: Vec::new(), [INFO] [stdout] 25 | | errors: Vec::new(), [INFO] [stdout] ... | [INFO] [stdout] 30 | | analyzer [INFO] [stdout] 31 | | } [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] 20 + impl Default for SemanticAnalyzer { [INFO] [stdout] 21 + fn default() -> Self { [INFO] [stdout] 22 + Self::new() [INFO] [stdout] 23 + } [INFO] [stdout] 24 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:108:70 [INFO] [stdout] | [INFO] [stdout] 108 | ... position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [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: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:121:62 [INFO] [stdout] | [INFO] [stdout] 121 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:132:62 [INFO] [stdout] | [INFO] [stdout] 132 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:231:62 [INFO] [stdout] | [INFO] [stdout] 231 | position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:237:58 [INFO] [stdout] | [INFO] [stdout] 237 | position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:248:70 [INFO] [stdout] | [INFO] [stdout] 248 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:257:70 [INFO] [stdout] | [INFO] [stdout] 257 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:266:70 [INFO] [stdout] | [INFO] [stdout] 266 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:273:66 [INFO] [stdout] | [INFO] [stdout] 273 | ... position: expr.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:313:54 [INFO] [stdout] | [INFO] [stdout] 313 | position: stmt.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:370:49 [INFO] [stdout] | [INFO] [stdout] 370 | position: span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:384:19 [INFO] [stdout] | [INFO] [stdout] 384 | var_type: &Box, [INFO] [stdout] | ^^^^^^^^^^ help: try: `&Node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:387:9 [INFO] [stdout] | [INFO] [stdout] 387 | / return match &**var_type { [INFO] [stdout] 388 | | Node::Identifier(id) => match id.to_string().as_str() { [INFO] [stdout] 389 | | "int" => Ok(Type::Number), [INFO] [stdout] ... | [INFO] [stdout] 406 | | }; [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] 387 ~ match &**var_type { [INFO] [stdout] 388 + Node::Identifier(id) => match id.to_string().as_str() { [INFO] [stdout] 389 + "int" => Ok(Type::Number), [INFO] [stdout] 390 + // "float" => Some(Type::Float), // TODO: implement when adding float type [INFO] [stdout] 391 + "str" => Ok(Type::String), [INFO] [stdout] 392 + "bool" => Ok(Type::Boolean), [INFO] [stdout] 393 + // Add more types as needed [INFO] [stdout] 394 + _ => Err(SemanticError::InvalidType { [INFO] [stdout] 395 + type_name: id.to_string(), [INFO] [stdout] 396 + position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] 397 + }), // Handle unknown types [INFO] [stdout] 398 + }, [INFO] [stdout] 399 + _ => { [INFO] [stdout] 400 + // Handle complex types or type expressions [INFO] [stdout] 401 + Err(SemanticError::InvalidType { [INFO] [stdout] 402 + type_name: format!("{:?}", var_type), [INFO] [stdout] 403 + position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] 404 + }) [INFO] [stdout] 405 + } [INFO] [stdout] 406 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:396:58 [INFO] [stdout] | [INFO] [stdout] 396 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Position` which implements the `Copy` trait [INFO] [stdout] --> crates/lumi_semantic/src/analyzer.rs:403:58 [INFO] [stdout] | [INFO] [stdout] 403 | position: decl.span.as_ref().map(|s| s.start.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `s.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: statement with no effect [INFO] [stdout] --> crates/lumi_vm/tests/vm_tests.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / r#" [INFO] [stdout] 60 | | fn test(x, y) { [INFO] [stdout] 61 | | x + y; [INFO] [stdout] ... | [INFO] [stdout] 64 | | test(1, 2); [INFO] [stdout] 65 | | "#; [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:177:16 [INFO] [stdout] | [INFO] [stdout] 177 | || self [INFO] [stdout] | ________________^ [INFO] [stdout] 178 | | .parent [INFO] [stdout] 179 | | .as_ref() [INFO] [stdout] 180 | | .map_or(false, |p| p.is_variable_declared(name)) [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 180 - .map_or(false, |p| p.is_variable_declared(name)) [INFO] [stdout] 180 + .is_some_and(|p| p.is_variable_declared(name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:224:16 [INFO] [stdout] | [INFO] [stdout] 224 | || self [INFO] [stdout] | ________________^ [INFO] [stdout] 225 | | .parent [INFO] [stdout] 226 | | .as_ref() [INFO] [stdout] 227 | | .map_or(false, |p| p.is_function_declared(name)) [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 227 - .map_or(false, |p| p.is_function_declared(name)) [INFO] [stdout] 227 + .is_some_and(|p| p.is_function_declared(name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::Type` [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | / pub fn to_string(&self) -> String { [INFO] [stdout] 107 | | match self { [INFO] [stdout] 108 | | Type::Undefined => "undefined".to_string(), [INFO] [stdout] 109 | | Type::Null => "null".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 134 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::Type` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:137:1 [INFO] [stdout] | [INFO] [stdout] 137 | / impl Default for Type { [INFO] [stdout] 138 | | fn default() -> Self { [INFO] [stdout] 139 | | Type::Any [INFO] [stdout] 140 | | } [INFO] [stdout] 141 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub enum Type { [INFO] [stdout] 9 | /// Undefined type [INFO] [stdout] ... [INFO] [stdout] 42 | /// Any type (can be anything) [INFO] [stdout] 43 ~ #[default] [INFO] [stdout] 44 ~ Any, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:322:17 [INFO] [stdout] | [INFO] [stdout] 322 | init: init, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `init` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/lumi_parser/tests/if_statement_tests.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | assert_eq!(*b, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 19 - assert_eq!(*b, true); [INFO] [stdout] 19 + assert!(*b); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:177:16 [INFO] [stdout] | [INFO] [stdout] 177 | || self [INFO] [stdout] | ________________^ [INFO] [stdout] 178 | | .parent [INFO] [stdout] 179 | | .as_ref() [INFO] [stdout] 180 | | .map_or(false, |p| p.is_variable_declared(name)) [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 180 - .map_or(false, |p| p.is_variable_declared(name)) [INFO] [stdout] 180 + .is_some_and(|p| p.is_variable_declared(name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lumi_semantic/src/scope.rs:224:16 [INFO] [stdout] | [INFO] [stdout] 224 | || self [INFO] [stdout] | ________________^ [INFO] [stdout] 225 | | .parent [INFO] [stdout] 226 | | .as_ref() [INFO] [stdout] 227 | | .map_or(false, |p| p.is_function_declared(name)) [INFO] [stdout] | |________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 227 - .map_or(false, |p| p.is_function_declared(name)) [INFO] [stdout] 227 + .is_some_and(|p| p.is_function_declared(name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::Type` [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:106:5 [INFO] [stdout] | [INFO] [stdout] 106 | / pub fn to_string(&self) -> String { [INFO] [stdout] 107 | | match self { [INFO] [stdout] 108 | | Type::Undefined => "undefined".to_string(), [INFO] [stdout] 109 | | Type::Null => "null".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 134 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::Type` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/lumi_semantic/src/types.rs:137:1 [INFO] [stdout] | [INFO] [stdout] 137 | / impl Default for Type { [INFO] [stdout] 138 | | fn default() -> Self { [INFO] [stdout] 139 | | Type::Any [INFO] [stdout] 140 | | } [INFO] [stdout] 141 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub enum Type { [INFO] [stdout] 9 | /// Undefined type [INFO] [stdout] ... [INFO] [stdout] 42 | /// Any type (can be anything) [INFO] [stdout] 43 ~ #[default] [INFO] [stdout] 44 ~ Any, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> crates/lumi_parser/tests/for_statement_tests.rs:41:17 [INFO] [stdout] | [INFO] [stdout] 41 | assert!(true); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `true` [INFO] [stdout] --> crates/lumi_parser/tests/for_statement_tests.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | assert!(true); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove the assertion [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking lumi_test v0.1.0 (/opt/rustwide/workdir/crates/lumi_engine) [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> crates/lumi_lexer/tests/lexer_tests.rs:68:48 [INFO] [stdout] | [INFO] [stdout] 68 | if k == "this" || k == "super" { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 69 | | assert_eq!(k, keyword); [INFO] [stdout] 70 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/lumi_lexer/tests/lexer_tests.rs:70:24 [INFO] [stdout] | [INFO] [stdout] 70 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 71 | | assert_eq!(k, keyword); [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub enum RecoveryStrategy { [INFO] [stdout] | ---------------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 16 | SkipUntilBlock, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | SkipUntilFunction, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | SkipUntilClass, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | SkipUntilModule, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 28 | InsertToken(String), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | ReplaceToken(String), [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | DeleteToken, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RecoveryStrategy` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `previous_token` and `recovery_tokens` are never read [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct RecoveryContext { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 47 | pub previous_token: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | pub recovery_tokens: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RecoveryContext` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `with_recovery_tokens`, `is_recovery_token`, and `current_position` are never used [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:99:12 [INFO] [stdout] | [INFO] [stdout] 84 | impl RecoveryContext { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 99 | pub fn with_recovery_tokens(mut self, tokens: Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 153 | pub fn is_recovery_token(&self, token: &Token) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 159 | pub fn current_position(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `has_errors`, `clear_errors`, `errors`, and `error_count` are never used [INFO] [stdout] --> crates/lumi_parser/src/recovery.rs:199:12 [INFO] [stdout] | [INFO] [stdout] 175 | impl ErrorRecovery { [INFO] [stdout] | ------------------ methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn has_errors(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 204 | pub fn clear_errors(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 210 | pub fn errors(&self) -> &[ParserError] { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 215 | pub fn error_count(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/lumi_semantic/tests/basic_tests.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | assert!(!result.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `result.is_ok()` [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: this `if` has identical blocks [INFO] [stdout] --> crates/lumi_lexer/tests/lexer_tests.rs:68:48 [INFO] [stdout] | [INFO] [stdout] 68 | if k == "this" || k == "super" { [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 69 | | assert_eq!(k, keyword); [INFO] [stdout] 70 | | } else { [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> crates/lumi_lexer/tests/lexer_tests.rs:70:24 [INFO] [stdout] | [INFO] [stdout] 70 | } else { [INFO] [stdout] | ________________________^ [INFO] [stdout] 71 | | assert_eq!(k, keyword); [INFO] [stdout] 72 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Engine` [INFO] [stdout] --> crates/lumi_engine/src/engine.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { [INFO] [stdout] 15 | | vm: Vm::new(), [INFO] [stdout] 16 | | semantic_analyzer: SemanticAnalyzer::new(), [INFO] [stdout] ... | [INFO] [stdout] 19 | | } [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] 12 + impl Default for Engine { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:350:17 [INFO] [stdout] | [INFO] [stdout] 350 | return Ok(Node::Identifier(name)); [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] 350 - return Ok(Node::Identifier(name)); [INFO] [stdout] 350 + Ok(Node::Identifier(name)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:389:13 [INFO] [stdout] | [INFO] [stdout] 389 | / return Ok(Node::AssignmentExpression(AssignmentExpression { [INFO] [stdout] 390 | | left: Box::new(left), [INFO] [stdout] 391 | | operator, [INFO] [stdout] 392 | | right, [INFO] [stdout] 393 | | span: Some(span), [INFO] [stdout] 394 | | })); [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] 389 ~ Ok(Node::AssignmentExpression(AssignmentExpression { [INFO] [stdout] 390 + left: Box::new(left), [INFO] [stdout] 391 + operator, [INFO] [stdout] 392 + right, [INFO] [stdout] 393 + span: Some(span), [INFO] [stdout] 394 ~ })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | return Ok(left); [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] 396 - return Ok(left); [INFO] [stdout] 396 + Ok(left) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:542:9 [INFO] [stdout] | [INFO] [stdout] 542 | / loop { [INFO] [stdout] 543 | | if let Some(token) = &self.current { [INFO] [stdout] 544 | | match &token.kind { [INFO] [stdout] ... | [INFO] [stdout] 604 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(token) = &self.current { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> crates/lumi_parser/src/parser.rs:821:16 [INFO] [stdout] | [INFO] [stdout] 821 | || self [INFO] [stdout] | ________________^ [INFO] [stdout] 822 | | .current [INFO] [stdout] 823 | | .as_ref() [INFO] [stdout] 824 | | .map_or(false, |t| t.kind == TokenKind::Eof) [INFO] [stdout] | |____________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 824 - .map_or(false, |t| t.kind == TokenKind::Eof) [INFO] [stdout] 824 + .is_some_and(|t| t.kind == TokenKind::Eof) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Engine` [INFO] [stdout] --> crates/lumi_engine/src/engine.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn new() -> Self { [INFO] [stdout] 14 | | Self { [INFO] [stdout] 15 | | vm: Vm::new(), [INFO] [stdout] 16 | | semantic_analyzer: SemanticAnalyzer::new(), [INFO] [stdout] ... | [INFO] [stdout] 19 | | } [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] 12 + impl Default for Engine { [INFO] [stdout] 13 + fn default() -> Self { [INFO] [stdout] 14 + Self::new() [INFO] [stdout] 15 + } [INFO] [stdout] 16 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> crates/lumi_parser/tests/basic_tests.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | assert_eq!(*b, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 65 - assert_eq!(*b, true); [INFO] [stdout] 65 + assert!(*b); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> crates/lumi_semantic/tests/basic_tests.rs:91:13 [INFO] [stdout] | [INFO] [stdout] 91 | assert!(!result.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `result.is_ok()` [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 pattern matching, consider using `is_ok()` [INFO] [stdout] --> crates/lumi_engine/src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / match stdin().read_line(input) { [INFO] [stdout] 18 | | Ok(_) => true, [INFO] [stdout] 19 | | Err(_) => false, [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ help: try: `stdin().read_line(input).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> crates/lumi_engine/src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / match stdin().read_line(input) { [INFO] [stdout] 18 | | Ok(_) => true, [INFO] [stdout] 19 | | Err(_) => false, [INFO] [stdout] 20 | | } [INFO] [stdout] | |_____^ help: try: `stdin().read_line(input).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> crates/lumi_lexer/src/lexer.rs:189:20 [INFO] [stdout] | [INFO] [stdout] 189 | if c >= '0' && c <= '7' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='7').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.58s [INFO] running `Command { std: "docker" "inspect" "b8bfe004c3ec77d8c9071e2b549f9faa6f2171d903b055ae0b8db8721c119d06", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b8bfe004c3ec77d8c9071e2b549f9faa6f2171d903b055ae0b8db8721c119d06", kill_on_drop: false }` [INFO] [stdout] b8bfe004c3ec77d8c9071e2b549f9faa6f2171d903b055ae0b8db8721c119d06