[INFO] cloning repository https://github.com/edwmorgan/rslox [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/edwmorgan/rslox" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fedwmorgan%2Frslox", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fedwmorgan%2Frslox'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9aefcf9a5642849b3f93dc78b1a0a151836dafda [INFO] linting edwmorgan/rslox against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fedwmorgan%2Frslox" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/edwmorgan/rslox [INFO] finished tweaking git repo https://github.com/edwmorgan/rslox [INFO] tweaked toml for git repo https://github.com/edwmorgan/rslox written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/edwmorgan/rslox 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/edwmorgan/rslox 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] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 999d8221b482677400989842a983c297480642a836839935dfd7b287f658dfab [INFO] running `Command { std: "docker" "start" "-a" "999d8221b482677400989842a983c297480642a836839935dfd7b287f658dfab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "999d8221b482677400989842a983c297480642a836839935dfd7b287f658dfab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "999d8221b482677400989842a983c297480642a836839935dfd7b287f658dfab", kill_on_drop: false }` [INFO] [stdout] 999d8221b482677400989842a983c297480642a836839935dfd7b287f658dfab [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] dd3394822dda011ba992e7ffbf9579f2b3e1991d0bbefd6e5adf1bdf7bd71ea3 [INFO] running `Command { std: "docker" "start" "-a" "dd3394822dda011ba992e7ffbf9579f2b3e1991d0bbefd6e5adf1bdf7bd71ea3", kill_on_drop: false }` [INFO] [stderr] Checking rslox v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `any` [INFO] [stdout] --> src/lib.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | any, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TokenType` [INFO] [stdout] --> src/syntax_tree.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::{scanner::{Token, TokenType}, interpreter::Nil}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Token` [INFO] [stdout] --> src/interpreter.rs:2:15 [INFO] [stdout] | [INFO] [stdout] 2 | scanner::{Token, TokenType}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::TypeId` [INFO] [stdout] --> src/interpreter.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::any::TypeId; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `any` [INFO] [stdout] --> src/lib.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | any, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `TokenType` [INFO] [stdout] --> src/syntax_tree.rs:1:30 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::{scanner::{Token, TokenType}, interpreter::Nil}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Token` [INFO] [stdout] --> src/interpreter.rs:2:15 [INFO] [stdout] | [INFO] [stdout] 2 | scanner::{Token, TokenType}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::TypeId` [INFO] [stdout] --> src/interpreter.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::any::TypeId; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `l` [INFO] [stdout] --> src/interpreter.rs:181:18 [INFO] [stdout] | [INFO] [stdout] 181 | Some(l) => true, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_l` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `literal` is never read [INFO] [stdout] --> src/scanner.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 319 | pub struct Token { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 322 | literal: Box, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Token` has a derived impl for the trait `Debug`, but this is 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: variant `Identifier` is never constructed [INFO] [stdout] --> src/scanner.rs:365:5 [INFO] [stdout] | [INFO] [stdout] 338 | pub enum TokenType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 365 | Identifier, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` 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: this boolean expression can be simplified [INFO] [stdout] --> src/scanner.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | if !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [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: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / Ok(self.tokens.push(Token::new( [INFO] [stdout] 38 | | TokenType::Eof, [INFO] [stdout] 39 | | "".to_string(), [INFO] [stdout] 40 | | Box::new(0), [INFO] [stdout] 41 | | self.line, [INFO] [stdout] 42 | | ))) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 37 ~ self.tokens.push(Token::new( [INFO] [stdout] 38 + TokenType::Eof, [INFO] [stdout] 39 + "".to_string(), [INFO] [stdout] 40 + Box::new(0), [INFO] [stdout] 41 + self.line, [INFO] [stdout] 42 + )); [INFO] [stdout] 43 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:49:20 [INFO] [stdout] | [INFO] [stdout] 49 | '(' => Ok(self.add_token(TokenType::LeftParen)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 49 ~ '(' => { [INFO] [stdout] 50 + self.add_token(TokenType::LeftParen); [INFO] [stdout] 51 + Ok(()) [INFO] [stdout] 52 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:50:20 [INFO] [stdout] | [INFO] [stdout] 50 | ')' => Ok(self.add_token(TokenType::RightParen)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 50 ~ ')' => { [INFO] [stdout] 51 + self.add_token(TokenType::RightParen); [INFO] [stdout] 52 + Ok(()) [INFO] [stdout] 53 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:51:20 [INFO] [stdout] | [INFO] [stdout] 51 | '{' => Ok(self.add_token(TokenType::LeftBrace)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 51 ~ '{' => { [INFO] [stdout] 52 + self.add_token(TokenType::LeftBrace); [INFO] [stdout] 53 + Ok(()) [INFO] [stdout] 54 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | '}' => Ok(self.add_token(TokenType::RightBrace)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 52 ~ '}' => { [INFO] [stdout] 53 + self.add_token(TokenType::RightBrace); [INFO] [stdout] 54 + Ok(()) [INFO] [stdout] 55 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:53:20 [INFO] [stdout] | [INFO] [stdout] 53 | ',' => Ok(self.add_token(TokenType::Comma)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 53 ~ ',' => { [INFO] [stdout] 54 + self.add_token(TokenType::Comma); [INFO] [stdout] 55 + Ok(()) [INFO] [stdout] 56 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:54:20 [INFO] [stdout] | [INFO] [stdout] 54 | '.' => Ok(self.add_token(TokenType::Dot)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 54 ~ '.' => { [INFO] [stdout] 55 + self.add_token(TokenType::Dot); [INFO] [stdout] 56 + Ok(()) [INFO] [stdout] 57 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | '-' => Ok(self.add_token(TokenType::Minus)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 55 ~ '-' => { [INFO] [stdout] 56 + self.add_token(TokenType::Minus); [INFO] [stdout] 57 + Ok(()) [INFO] [stdout] 58 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | '+' => Ok(self.add_token(TokenType::Plus)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 56 ~ '+' => { [INFO] [stdout] 57 + self.add_token(TokenType::Plus); [INFO] [stdout] 58 + Ok(()) [INFO] [stdout] 59 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | ';' => Ok(self.add_token(TokenType::Semicolon)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 57 ~ ';' => { [INFO] [stdout] 58 + self.add_token(TokenType::Semicolon); [INFO] [stdout] 59 + Ok(()) [INFO] [stdout] 60 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:58:20 [INFO] [stdout] | [INFO] [stdout] 58 | '*' => Ok(self.add_token(TokenType::Star)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 58 ~ '*' => { [INFO] [stdout] 59 + self.add_token(TokenType::Star); [INFO] [stdout] 60 + Ok(()) [INFO] [stdout] 61 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | '?' => Ok(self.add_token(TokenType::QuestionMark)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 59 ~ '?' => { [INFO] [stdout] 60 + self.add_token(TokenType::QuestionMark); [INFO] [stdout] 61 + Ok(()) [INFO] [stdout] 62 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:60:20 [INFO] [stdout] | [INFO] [stdout] 60 | ':' => Ok(self.add_token(TokenType::Colon)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 60 ~ ':' => { [INFO] [stdout] 61 + self.add_token(TokenType::Colon); [INFO] [stdout] 62 + Ok(()) [INFO] [stdout] 63 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 67 ~ self.add_token(matched_char); [INFO] [stdout] 68 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 75 ~ self.add_token(matched_char); [INFO] [stdout] 76 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 83 ~ self.add_token(matched_char); [INFO] [stdout] 84 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 91 ~ self.add_token(matched_char); [INFO] [stdout] 92 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/scanner.rs:109:32 [INFO] [stdout] | [INFO] [stdout] 109 | } else if self.peek() == '*' { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 110 | | star_found = true; [INFO] [stdout] 111 | | } else { [INFO] [stdout] 112 | | star_found = false; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________________^ help: you can reduce it to: `{ star_found = self.peek() == '*'; }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:120:21 [INFO] [stdout] | [INFO] [stdout] 120 | Ok(self.add_token(TokenType::Slash)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 120 ~ self.add_token(TokenType::Slash); [INFO] [stdout] 121 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | '\n' => Ok(self.line += 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 125 ~ '\n' => { [INFO] [stdout] 126 + let _: () = self.line += 1; [INFO] [stdout] 127 + Ok(()) [INFO] [stdout] 128 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scanner.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | return res; [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] 177 - return res; [INFO] [stdout] 177 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/scanner.rs:282:5 [INFO] [stdout] | [INFO] [stdout] 282 | c >= '0' && c <= '9' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').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] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/scanner.rs:286:5 [INFO] [stdout] | [INFO] [stdout] 286 | (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').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] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/scanner.rs:286:31 [INFO] [stdout] | [INFO] [stdout] 286 | (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scanner.rs:315:5 [INFO] [stdout] | [INFO] [stdout] 315 | return reserved_identifiers; [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] 315 - return reserved_identifiers; [INFO] [stdout] 315 + reserved_identifiers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/syntax_tree.rs:20:35 [INFO] [stdout] | [INFO] [stdout] 20 | Expr::StringLiteral(v) => format!("{}", v), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/syntax_tree.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | Expr::NilLiteral() => format!("nil"), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"nil".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/parser.rs:35:30 [INFO] [stdout] | [INFO] [stdout] 35 | Ok(_) => Err(format!("Unable to parse rhs of ternary.")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unable to parse rhs of ternary.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] --> src/parser.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:121:8 [INFO] [stdout] | [INFO] [stdout] 121 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:145:24 [INFO] [stdout] | [INFO] [stdout] 145 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:179:5 [INFO] [stdout] | [INFO] [stdout] 179 | return false; [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] 179 - return false; [INFO] [stdout] 179 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:23:33 [INFO] [stdout] | [INFO] [stdout] 23 | None => Err(format!("failed to convert value to f64")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"failed to convert value to f64".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | Err(format!("left value is not a numeric type.")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"left value is not a numeric type.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `l` [INFO] [stdout] --> src/interpreter.rs:181:18 [INFO] [stdout] | [INFO] [stdout] 181 | Some(l) => true, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_l` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `literal` is never read [INFO] [stdout] --> src/scanner.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 319 | pub struct Token { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 322 | literal: Box, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Token` has a derived impl for the trait `Debug`, but this is 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: variant `Identifier` is never constructed [INFO] [stdout] --> src/scanner.rs:365:5 [INFO] [stdout] | [INFO] [stdout] 338 | pub enum TokenType { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 365 | Identifier, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokenType` 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: calling `.type_id()` on `Box` [INFO] [stdout] --> src/interpreter.rs:166:8 [INFO] [stdout] | [INFO] [stdout] 166 | if (*left_value).type_id() == (*right_value).type_id() { [INFO] [stdout] | -------------^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider dereferencing first: `(*(*left_value))` [INFO] [stdout] | [INFO] [stdout] = note: this returns the type id of the literal type `Box<_>` instead of the type id of the boxed value, which is most likely not what you want [INFO] [stdout] = note: if this is intentional, use `TypeId::of::>()` instead, which makes it more clear [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_id_on_box [INFO] [stdout] = note: `#[warn(clippy::type_id_on_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `.type_id()` on `Box` [INFO] [stdout] --> src/interpreter.rs:166:35 [INFO] [stdout] | [INFO] [stdout] 166 | if (*left_value).type_id() == (*right_value).type_id() { [INFO] [stdout] | --------------^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider dereferencing first: `(*(*right_value))` [INFO] [stdout] | [INFO] [stdout] = note: this returns the type id of the literal type `Box<_>` instead of the type id of the boxed value, which is most likely not what you want [INFO] [stdout] = note: if this is intentional, use `TypeId::of::>()` instead, which makes it more clear [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_id_on_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interpreter.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | / match (*left_value).downcast_ref::() { [INFO] [stdout] 169 | | Some(l) => return *l == *(right_value).downcast_ref::().unwrap(), [INFO] [stdout] 170 | | None => (), [INFO] [stdout] 171 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(l) = (*left_value).downcast_ref::() { return *l == *(right_value).downcast_ref::().unwrap() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/scanner.rs:33:16 [INFO] [stdout] | [INFO] [stdout] 33 | if !res.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `res.is_err()` [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: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / Ok(self.tokens.push(Token::new( [INFO] [stdout] 38 | | TokenType::Eof, [INFO] [stdout] 39 | | "".to_string(), [INFO] [stdout] 40 | | Box::new(0), [INFO] [stdout] 41 | | self.line, [INFO] [stdout] 42 | | ))) [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 37 ~ self.tokens.push(Token::new( [INFO] [stdout] 38 + TokenType::Eof, [INFO] [stdout] 39 + "".to_string(), [INFO] [stdout] 40 + Box::new(0), [INFO] [stdout] 41 + self.line, [INFO] [stdout] 42 + )); [INFO] [stdout] 43 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:49:20 [INFO] [stdout] | [INFO] [stdout] 49 | '(' => Ok(self.add_token(TokenType::LeftParen)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 49 ~ '(' => { [INFO] [stdout] 50 + self.add_token(TokenType::LeftParen); [INFO] [stdout] 51 + Ok(()) [INFO] [stdout] 52 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:50:20 [INFO] [stdout] | [INFO] [stdout] 50 | ')' => Ok(self.add_token(TokenType::RightParen)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 50 ~ ')' => { [INFO] [stdout] 51 + self.add_token(TokenType::RightParen); [INFO] [stdout] 52 + Ok(()) [INFO] [stdout] 53 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interpreter.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | / match (*left_value).downcast_ref::() { [INFO] [stdout] 173 | | Some(l) => return *l == *(right_value).downcast_ref::().unwrap(), [INFO] [stdout] 174 | | None => (), [INFO] [stdout] 175 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(l) = (*left_value).downcast_ref::() { return *l == *(right_value).downcast_ref::().unwrap() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interpreter.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | / match (*left_value).downcast_ref::() { [INFO] [stdout] 177 | | Some(l) => return *l == *(right_value).downcast_ref::().unwrap(), [INFO] [stdout] 178 | | None => (), [INFO] [stdout] 179 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(l) = (*left_value).downcast_ref::() { return *l == *(right_value).downcast_ref::().unwrap() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:51:20 [INFO] [stdout] | [INFO] [stdout] 51 | '{' => Ok(self.add_token(TokenType::LeftBrace)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 51 ~ '{' => { [INFO] [stdout] 52 + self.add_token(TokenType::LeftBrace); [INFO] [stdout] 53 + Ok(()) [INFO] [stdout] 54 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | '}' => Ok(self.add_token(TokenType::RightBrace)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 52 ~ '}' => { [INFO] [stdout] 53 + self.add_token(TokenType::RightBrace); [INFO] [stdout] 54 + Ok(()) [INFO] [stdout] 55 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:53:20 [INFO] [stdout] | [INFO] [stdout] 53 | ',' => Ok(self.add_token(TokenType::Comma)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 53 ~ ',' => { [INFO] [stdout] 54 + self.add_token(TokenType::Comma); [INFO] [stdout] 55 + Ok(()) [INFO] [stdout] 56 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:54:20 [INFO] [stdout] | [INFO] [stdout] 54 | '.' => Ok(self.add_token(TokenType::Dot)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 54 ~ '.' => { [INFO] [stdout] 55 + self.add_token(TokenType::Dot); [INFO] [stdout] 56 + Ok(()) [INFO] [stdout] 57 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | '-' => Ok(self.add_token(TokenType::Minus)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 55 ~ '-' => { [INFO] [stdout] 56 + self.add_token(TokenType::Minus); [INFO] [stdout] 57 + Ok(()) [INFO] [stdout] 58 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | '+' => Ok(self.add_token(TokenType::Plus)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 56 ~ '+' => { [INFO] [stdout] 57 + self.add_token(TokenType::Plus); [INFO] [stdout] 58 + Ok(()) [INFO] [stdout] 59 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | ';' => Ok(self.add_token(TokenType::Semicolon)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 57 ~ ';' => { [INFO] [stdout] 58 + self.add_token(TokenType::Semicolon); [INFO] [stdout] 59 + Ok(()) [INFO] [stdout] 60 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:58:20 [INFO] [stdout] | [INFO] [stdout] 58 | '*' => Ok(self.add_token(TokenType::Star)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 58 ~ '*' => { [INFO] [stdout] 59 + self.add_token(TokenType::Star); [INFO] [stdout] 60 + Ok(()) [INFO] [stdout] 61 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | '?' => Ok(self.add_token(TokenType::QuestionMark)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 59 ~ '?' => { [INFO] [stdout] 60 + self.add_token(TokenType::QuestionMark); [INFO] [stdout] 61 + Ok(()) [INFO] [stdout] 62 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:60:20 [INFO] [stdout] | [INFO] [stdout] 60 | ':' => Ok(self.add_token(TokenType::Colon)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 60 ~ ':' => { [INFO] [stdout] 61 + self.add_token(TokenType::Colon); [INFO] [stdout] 62 + Ok(()) [INFO] [stdout] 63 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:67:17 [INFO] [stdout] | [INFO] [stdout] 67 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 67 ~ self.add_token(matched_char); [INFO] [stdout] 68 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/lib.rs:27:39 [INFO] [stdout] | [INFO] [stdout] 27 | Box::new(Expr::IntLiteral(123 as i64)), [INFO] [stdout] | ^^^^^^^^^^ help: try: `123_i64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/lib.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/lib.rs:60:36 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn run_file(file_path: &String) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:75:17 [INFO] [stdout] | [INFO] [stdout] 75 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 75 ~ self.add_token(matched_char); [INFO] [stdout] 76 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:83:17 [INFO] [stdout] | [INFO] [stdout] 83 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 83 ~ self.add_token(matched_char); [INFO] [stdout] 84 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:91:17 [INFO] [stdout] | [INFO] [stdout] 91 | Ok(self.add_token(matched_char)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 91 ~ self.add_token(matched_char); [INFO] [stdout] 92 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RsLox` [INFO] [stdout] --> src/lib.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | / pub fn new() -> Self { [INFO] [stdout] 85 | | RsLox { had_error: false } [INFO] [stdout] 86 | | } [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] 83 + impl Default for RsLox { [INFO] [stdout] 84 + fn default() -> Self { [INFO] [stdout] 85 + Self::new() [INFO] [stdout] 86 + } [INFO] [stdout] 87 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression assigns a bool literal [INFO] [stdout] --> src/scanner.rs:109:32 [INFO] [stdout] | [INFO] [stdout] 109 | } else if self.peek() == '*' { [INFO] [stdout] | ________________________________^ [INFO] [stdout] 110 | | star_found = true; [INFO] [stdout] 111 | | } else { [INFO] [stdout] 112 | | star_found = false; [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________________^ help: you can reduce it to: `{ star_found = self.peek() == '*'; }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign [INFO] [stdout] = note: `#[warn(clippy::needless_bool_assign)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:120:21 [INFO] [stdout] | [INFO] [stdout] 120 | Ok(self.add_token(TokenType::Slash)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 120 ~ self.add_token(TokenType::Slash); [INFO] [stdout] 121 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/scanner.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | '\n' => Ok(self.line += 1), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 125 ~ '\n' => { [INFO] [stdout] 126 + let _: () = self.line += 1; [INFO] [stdout] 127 + Ok(()) [INFO] [stdout] 128 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scanner.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | return res; [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] 177 - return res; [INFO] [stdout] 177 + res [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/scanner.rs:282:5 [INFO] [stdout] | [INFO] [stdout] 282 | c >= '0' && c <= '9' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').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] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/scanner.rs:286:5 [INFO] [stdout] | [INFO] [stdout] 286 | (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').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] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/scanner.rs:286:31 [INFO] [stdout] | [INFO] [stdout] 286 | (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/scanner.rs:315:5 [INFO] [stdout] | [INFO] [stdout] 315 | return reserved_identifiers; [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] 315 - return reserved_identifiers; [INFO] [stdout] 315 + reserved_identifiers [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/syntax_tree.rs:20:35 [INFO] [stdout] | [INFO] [stdout] 20 | Expr::StringLiteral(v) => format!("{}", v), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/syntax_tree.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | Expr::NilLiteral() => format!("nil"), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"nil".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/parser.rs:35:30 [INFO] [stdout] | [INFO] [stdout] 35 | Ok(_) => Err(format!("Unable to parse rhs of ternary.")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unable to parse rhs of ternary.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] --> src/parser.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:121:8 [INFO] [stdout] | [INFO] [stdout] 121 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/parser.rs:145:24 [INFO] [stdout] | [INFO] [stdout] 145 | if p.tokens.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.tokens.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:179:5 [INFO] [stdout] | [INFO] [stdout] 179 | return false; [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] 179 - return false; [INFO] [stdout] 179 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:23:33 [INFO] [stdout] | [INFO] [stdout] 23 | None => Err(format!("failed to convert value to f64")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"failed to convert value to f64".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/interpreter.rs:124:13 [INFO] [stdout] | [INFO] [stdout] 124 | Err(format!("left value is not a numeric type.")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"left value is not a numeric type.".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `.type_id()` on `Box` [INFO] [stdout] --> src/interpreter.rs:166:8 [INFO] [stdout] | [INFO] [stdout] 166 | if (*left_value).type_id() == (*right_value).type_id() { [INFO] [stdout] | -------------^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider dereferencing first: `(*(*left_value))` [INFO] [stdout] | [INFO] [stdout] = note: this returns the type id of the literal type `Box<_>` instead of the type id of the boxed value, which is most likely not what you want [INFO] [stdout] = note: if this is intentional, use `TypeId::of::>()` instead, which makes it more clear [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_id_on_box [INFO] [stdout] = note: `#[warn(clippy::type_id_on_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `.type_id()` on `Box` [INFO] [stdout] --> src/interpreter.rs:166:35 [INFO] [stdout] | [INFO] [stdout] 166 | if (*left_value).type_id() == (*right_value).type_id() { [INFO] [stdout] | --------------^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: consider dereferencing first: `(*(*right_value))` [INFO] [stdout] | [INFO] [stdout] = note: this returns the type id of the literal type `Box<_>` instead of the type id of the boxed value, which is most likely not what you want [INFO] [stdout] = note: if this is intentional, use `TypeId::of::>()` instead, which makes it more clear [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_id_on_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interpreter.rs:168:9 [INFO] [stdout] | [INFO] [stdout] 168 | / match (*left_value).downcast_ref::() { [INFO] [stdout] 169 | | Some(l) => return *l == *(right_value).downcast_ref::().unwrap(), [INFO] [stdout] 170 | | None => (), [INFO] [stdout] 171 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(l) = (*left_value).downcast_ref::() { return *l == *(right_value).downcast_ref::().unwrap() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interpreter.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | / match (*left_value).downcast_ref::() { [INFO] [stdout] 173 | | Some(l) => return *l == *(right_value).downcast_ref::().unwrap(), [INFO] [stdout] 174 | | None => (), [INFO] [stdout] 175 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(l) = (*left_value).downcast_ref::() { return *l == *(right_value).downcast_ref::().unwrap() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/interpreter.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | / match (*left_value).downcast_ref::() { [INFO] [stdout] 177 | | Some(l) => return *l == *(right_value).downcast_ref::().unwrap(), [INFO] [stdout] 178 | | None => (), [INFO] [stdout] 179 | | }; [INFO] [stdout] | |_________^ help: try: `if let Some(l) = (*left_value).downcast_ref::() { return *l == *(right_value).downcast_ref::().unwrap() }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i64` is unnecessary [INFO] [stdout] --> src/lib.rs:27:39 [INFO] [stdout] | [INFO] [stdout] 27 | Box::new(Expr::IntLiteral(123 as i64)), [INFO] [stdout] | ^^^^^^^^^^ help: try: `123_i64` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/lib.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/lib.rs:60:36 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn run_file(file_path: &String) -> () { [INFO] [stdout] | ^^^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RsLox` [INFO] [stdout] --> src/lib.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | / pub fn new() -> Self { [INFO] [stdout] 85 | | RsLox { had_error: false } [INFO] [stdout] 86 | | } [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] 83 + impl Default for RsLox { [INFO] [stdout] 84 + fn default() -> Self { [INFO] [stdout] 85 + Self::new() [INFO] [stdout] 86 + } [INFO] [stdout] 87 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s [INFO] running `Command { std: "docker" "inspect" "dd3394822dda011ba992e7ffbf9579f2b3e1991d0bbefd6e5adf1bdf7bd71ea3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dd3394822dda011ba992e7ffbf9579f2b3e1991d0bbefd6e5adf1bdf7bd71ea3", kill_on_drop: false }` [INFO] [stdout] dd3394822dda011ba992e7ffbf9579f2b3e1991d0bbefd6e5adf1bdf7bd71ea3