[INFO] cloning repository https://github.com/proxin187/JetLang [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/proxin187/JetLang" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fproxin187%2FJetLang", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fproxin187%2FJetLang'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0f9d07ae16569953734ddfb8fe21907609e8a3f8 [INFO] linting proxin187/JetLang against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fproxin187%2FJetLang" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/proxin187/JetLang [INFO] finished tweaking git repo https://github.com/proxin187/JetLang [INFO] tweaked toml for git repo https://github.com/proxin187/JetLang written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/proxin187/JetLang 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/proxin187/JetLang 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] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] a34eeebf9844757b9d25f636e54c3f2f8af24d7789e9398c225020eadc3f514b [INFO] running `Command { std: "docker" "start" "-a" "a34eeebf9844757b9d25f636e54c3f2f8af24d7789e9398c225020eadc3f514b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a34eeebf9844757b9d25f636e54c3f2f8af24d7789e9398c225020eadc3f514b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a34eeebf9844757b9d25f636e54c3f2f8af24d7789e9398c225020eadc3f514b", kill_on_drop: false }` [INFO] [stdout] a34eeebf9844757b9d25f636e54c3f2f8af24d7789e9398c225020eadc3f514b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 96c37b6dd10b0332d9b11c0cb7cb2d1aabb92774cd213784911beb932330e718 [INFO] running `Command { std: "docker" "start" "-a" "96c37b6dd10b0332d9b11c0cb7cb2d1aabb92774cd213784911beb932330e718", kill_on_drop: false }` [INFO] [stderr] Checking jetlang v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: value assigned to `rexpr_location` is never read [INFO] [stdout] --> src/ast/mod.rs:142:30 [INFO] [stdout] | [INFO] [stdout] 142 | let mut rexpr_location = (0, 0); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `rexpr_location` is never read [INFO] [stdout] --> src/ast/mod.rs:142:30 [INFO] [stdout] | [INFO] [stdout] 142 | let mut rexpr_location = (0, 0); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_string` is never used [INFO] [stdout] --> src/lexer/mod.rs:110:4 [INFO] [stdout] | [INFO] [stdout] 110 | fn to_string(char_code: &Result) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ast/mod.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | Ident(String, lexer::SourceLocation), [INFO] [stdout] | ----- ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 8 - Ident(String, lexer::SourceLocation), [INFO] [stdout] 8 + Ident((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ast/mod.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | Str(String, lexer::SourceLocation), [INFO] [stdout] | --- ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 9 - Str(String, lexer::SourceLocation), [INFO] [stdout] 9 + Str((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ast/mod.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | Int(usize, lexer::SourceLocation), [INFO] [stdout] | --- ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 10 - Int(usize, lexer::SourceLocation), [INFO] [stdout] 10 + Int((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `rexpr`, `lexpr`, and `op` are never read [INFO] [stdout] --> src/ast/mod.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 14 | Comparison { [INFO] [stdout] | ---------- fields in this variant [INFO] [stdout] 15 | rexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 16 | lexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | op: (lexer::Comparison, lexer::SourceLocation), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `rexpr`, `lexpr`, and `op` are never read [INFO] [stdout] --> src/ast/mod.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | BinaryExpr { [INFO] [stdout] | ---------- fields in this variant [INFO] [stdout] 20 | rexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 21 | lexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 22 | op: (lexer::Operator, lexer::SourceLocation), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `parameters`, `return_type`, and `body` are never read [INFO] [stdout] --> src/ast/mod.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 24 | Function { [INFO] [stdout] | -------- fields in this variant [INFO] [stdout] 25 | name: (String, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 26 | parameters: (Vec<(String, lexer::Type, lexer::SourceLocation)>, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 27 | return_type: (lexer::Type, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 28 | body: (Vec, lexer::SourceLocation) [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `expr` is never read [INFO] [stdout] --> src/ast/mod.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 30 | Return { [INFO] [stdout] | ------ field in this variant [INFO] [stdout] 31 | expr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `parameters` are never read [INFO] [stdout] --> src/ast/mod.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 33 | Call { [INFO] [stdout] | ---- fields in this variant [INFO] [stdout] 34 | name: (String, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 35 | parameters: (Vec, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `var_type`, and `expr` are never read [INFO] [stdout] --> src/ast/mod.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 37 | Variable { [INFO] [stdout] | -------- fields in this variant [INFO] [stdout] 38 | name: (String, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 39 | var_type: (lexer::Type, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 40 | expr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `test`, `then_body`, and `else_body` are never read [INFO] [stdout] --> src/ast/mod.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 42 | If { [INFO] [stdout] | -- fields in this variant [INFO] [stdout] 43 | test: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 44 | then_body: (Vec, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 45 | else_body: (Vec, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_string` is never used [INFO] [stdout] --> src/lexer/mod.rs:110:4 [INFO] [stdout] | [INFO] [stdout] 110 | fn to_string(char_code: &Result) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ast/mod.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | Ident(String, lexer::SourceLocation), [INFO] [stdout] | ----- ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 8 - Ident(String, lexer::SourceLocation), [INFO] [stdout] 8 + Ident((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ast/mod.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | Str(String, lexer::SourceLocation), [INFO] [stdout] | --- ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 9 - Str(String, lexer::SourceLocation), [INFO] [stdout] 9 + Str((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ast/mod.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | Int(usize, lexer::SourceLocation), [INFO] [stdout] | --- ^^^^^ ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 10 - Int(usize, lexer::SourceLocation), [INFO] [stdout] 10 + Int((), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `rexpr`, `lexpr`, and `op` are never read [INFO] [stdout] --> src/ast/mod.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 14 | Comparison { [INFO] [stdout] | ---------- fields in this variant [INFO] [stdout] 15 | rexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 16 | lexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 17 | op: (lexer::Comparison, lexer::SourceLocation), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `rexpr`, `lexpr`, and `op` are never read [INFO] [stdout] --> src/ast/mod.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 19 | BinaryExpr { [INFO] [stdout] | ---------- fields in this variant [INFO] [stdout] 20 | rexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 21 | lexpr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 22 | op: (lexer::Operator, lexer::SourceLocation), [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `parameters`, `return_type`, and `body` are never read [INFO] [stdout] --> src/ast/mod.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 24 | Function { [INFO] [stdout] | -------- fields in this variant [INFO] [stdout] 25 | name: (String, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 26 | parameters: (Vec<(String, lexer::Type, lexer::SourceLocation)>, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 27 | return_type: (lexer::Type, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 28 | body: (Vec, lexer::SourceLocation) [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `expr` is never read [INFO] [stdout] --> src/ast/mod.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 30 | Return { [INFO] [stdout] | ------ field in this variant [INFO] [stdout] 31 | expr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `int` after checking its variant with `is_err` [INFO] [stdout] --> src/lexer/mod.rs:150:35 [INFO] [stdout] | [INFO] [stdout] 147 | if int.is_err() { [INFO] [stdout] | --------------- help: try: `if let Ok() = int` [INFO] [stdout] ... [INFO] [stdout] 150 | return Token::Int(int.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `parameters` are never read [INFO] [stdout] --> src/ast/mod.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 33 | Call { [INFO] [stdout] | ---- fields in this variant [INFO] [stdout] 34 | name: (String, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 35 | parameters: (Vec, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `var_type`, and `expr` are never read [INFO] [stdout] --> src/ast/mod.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 37 | Variable { [INFO] [stdout] | -------- fields in this variant [INFO] [stdout] 38 | name: (String, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 39 | var_type: (lexer::Type, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 40 | expr: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `test`, `then_body`, and `else_body` are never read [INFO] [stdout] --> src/ast/mod.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 42 | If { [INFO] [stdout] | -- fields in this variant [INFO] [stdout] 43 | test: (Box, lexer::SourceLocation), [INFO] [stdout] | ^^^^ [INFO] [stdout] 44 | then_body: (Vec, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 45 | else_body: (Vec, lexer::SourceLocation), [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer/mod.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | return Token::Ident(token.to_string()); [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] 148 - return Token::Ident(token.to_string()); [INFO] [stdout] 148 + Token::Ident(token.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer/mod.rs:150:17 [INFO] [stdout] | [INFO] [stdout] 150 | return Token::Int(int.unwrap()); [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] 150 - return Token::Int(int.unwrap()); [INFO] [stdout] 150 + Token::Int(int.unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer/mod.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | return tokens; [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] 232 - return tokens; [INFO] [stdout] 232 + tokens [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/lexer/mod.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 167 | if &(index + 1) < &bytes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 167 - if &(index + 1) < &bytes.len() { [INFO] [stdout] 167 + if (index + 1) < bytes.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lexer/mod.rs:171:25 [INFO] [stdout] | [INFO] [stdout] 171 | token = token + "=="; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token += "=="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:174:41 [INFO] [stdout] | [INFO] [stdout] 174 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [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 an assign operation [INFO] [stdout] --> src/lexer/mod.rs:178:25 [INFO] [stdout] | [INFO] [stdout] 178 | token = token + "!="; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token += "!="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:181:41 [INFO] [stdout] | [INFO] [stdout] 181 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:188:41 [INFO] [stdout] | [INFO] [stdout] 188 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:193:37 [INFO] [stdout] | [INFO] [stdout] 193 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [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: comparison to empty slice [INFO] [stdout] --> src/lexer/mod.rs:198:31 [INFO] [stdout] | [INFO] [stdout] 198 | } else if token != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!token.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lexer/mod.rs:210:25 [INFO] [stdout] | [INFO] [stdout] 210 | token = token + "\n"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token += "\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:213:39 [INFO] [stdout] | [INFO] [stdout] 213 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:216:37 [INFO] [stdout] | [INFO] [stdout] 216 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `int` after checking its variant with `is_err` [INFO] [stdout] --> src/lexer/mod.rs:150:35 [INFO] [stdout] | [INFO] [stdout] 147 | if int.is_err() { [INFO] [stdout] | --------------- help: try: `if let Ok() = int` [INFO] [stdout] ... [INFO] [stdout] 150 | return Token::Int(int.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer/mod.rs:148:17 [INFO] [stdout] | [INFO] [stdout] 148 | return Token::Ident(token.to_string()); [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] 148 - return Token::Ident(token.to_string()); [INFO] [stdout] 148 + Token::Ident(token.to_string()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer/mod.rs:150:17 [INFO] [stdout] | [INFO] [stdout] 150 | return Token::Int(int.unwrap()); [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] 150 - return Token::Int(int.unwrap()); [INFO] [stdout] 150 + Token::Int(int.unwrap()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ast/mod.rs:80:15 [INFO] [stdout] | [INFO] [stdout] 80 | while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 80 - while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] 80 + while !(&expr[index].0 == &Token::CloseParen && indentation == 0) { [INFO] [stdout] | [INFO] [stdout] 80 - while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] 80 + while &expr[index].0 != &Token::CloseParen || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lexer/mod.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | return tokens; [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] 232 - return tokens; [INFO] [stdout] 232 + tokens [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast/mod.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | return Node::Int(0, (0, 0)); [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] 134 - return Node::Int(0, (0, 0)); [INFO] [stdout] 134 + Node::Int(0, (0, 0)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ast/mod.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | fn parse_expr(expr: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 54 - fn parse_expr(expr: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] 54 + fn parse_expr(expr: &[(Token, lexer::SourceLocation)]) -> Node { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/lexer/mod.rs:167:12 [INFO] [stdout] | [INFO] [stdout] 167 | if &(index + 1) < &bytes.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 167 - if &(index + 1) < &bytes.len() { [INFO] [stdout] 167 + if (index + 1) < bytes.len() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:59:34 [INFO] [stdout] | [INFO] [stdout] 59 | return Node::Int(integer.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*integer` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:59:51 [INFO] [stdout] | [INFO] [stdout] 59 | return Node::Int(integer.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[0].1` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:62:50 [INFO] [stdout] | [INFO] [stdout] 62 | return Node::Str(string.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[0].1` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:65:51 [INFO] [stdout] | [INFO] [stdout] 65 | return Node::Ident(ident.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[0].1` [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: manual implementation of an assign operation [INFO] [stdout] --> src/lexer/mod.rs:171:25 [INFO] [stdout] | [INFO] [stdout] 171 | token = token + "=="; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token += "=="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if &expr[index].0 != &Token::OpenParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 72 - if &expr[index].0 != &Token::OpenParen { [INFO] [stdout] 72 + if expr[index].0 != Token::OpenParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:174:41 [INFO] [stdout] | [INFO] [stdout] 174 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [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: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:77:35 [INFO] [stdout] | [INFO] [stdout] 77 | let parameters_location = expr[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[index].1` [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: manual implementation of an assign operation [INFO] [stdout] --> src/lexer/mod.rs:178:25 [INFO] [stdout] | [INFO] [stdout] 178 | token = token + "!="; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token += "!="` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 80 - while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] 80 + while (expr[index].0 != Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:181:41 [INFO] [stdout] | [INFO] [stdout] 181 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:81:16 [INFO] [stdout] | [INFO] [stdout] 81 | if &expr[index].0 == &Token::OpenParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 81 - if &expr[index].0 == &Token::OpenParen { [INFO] [stdout] 81 + if expr[index].0 == Token::OpenParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:188:41 [INFO] [stdout] | [INFO] [stdout] 188 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:83:23 [INFO] [stdout] | [INFO] [stdout] 83 | } else if &expr[index].0 == &Token::CloseParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 83 - } else if &expr[index].0 == &Token::CloseParen { [INFO] [stdout] 83 + } else if expr[index].0 == Token::CloseParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:86:16 [INFO] [stdout] | [INFO] [stdout] 86 | if &expr[index].0 == &Token::Comma { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 86 - if &expr[index].0 == &Token::Comma { [INFO] [stdout] 86 + if expr[index].0 == Token::Comma { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:193:37 [INFO] [stdout] | [INFO] [stdout] 193 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [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: length comparison to zero [INFO] [stdout] --> src/ast/mod.rs:94:12 [INFO] [stdout] | [INFO] [stdout] 94 | if parameter.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parameter.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: comparison to empty slice [INFO] [stdout] --> src/lexer/mod.rs:198:31 [INFO] [stdout] | [INFO] [stdout] 198 | } else if token != "" { [INFO] [stdout] | ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!token.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:98:35 [INFO] [stdout] | [INFO] [stdout] 98 | name: (ident.clone(), ident_location.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*ident_location` [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: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/ast/mod.rs:110:15 [INFO] [stdout] | [INFO] [stdout] 110 | while operator_found == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!operator_found` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/lexer/mod.rs:210:25 [INFO] [stdout] | [INFO] [stdout] 210 | token = token + "\n"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `token += "\n"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:213:39 [INFO] [stdout] | [INFO] [stdout] 213 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lexer/mod.rs:216:37 [INFO] [stdout] | [INFO] [stdout] 216 | token = token + &character; [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `character` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ast/mod.rs:80:15 [INFO] [stdout] | [INFO] [stdout] 80 | while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 80 - while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] 80 + while !(&expr[index].0 == &Token::CloseParen && indentation == 0) { [INFO] [stdout] | [INFO] [stdout] 80 - while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] 80 + while &expr[index].0 != &Token::CloseParen || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast/mod.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 134 | return Node::Int(0, (0, 0)); [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] 134 - return Node::Int(0, (0, 0)); [INFO] [stdout] 134 + Node::Int(0, (0, 0)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ast/mod.rs:54:21 [INFO] [stdout] | [INFO] [stdout] 54 | fn parse_expr(expr: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 54 - fn parse_expr(expr: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] 54 + fn parse_expr(expr: &[(Token, lexer::SourceLocation)]) -> Node { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:59:34 [INFO] [stdout] | [INFO] [stdout] 59 | return Node::Int(integer.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*integer` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:59:51 [INFO] [stdout] | [INFO] [stdout] 59 | return Node::Int(integer.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[0].1` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:62:50 [INFO] [stdout] | [INFO] [stdout] 62 | return Node::Str(string.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[0].1` [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 `Operator` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | operator = (op.clone(), expr[index].1); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*op` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:65:51 [INFO] [stdout] | [INFO] [stdout] 65 | return Node::Ident(ident.clone(), expr[0].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[0].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if &expr[index].0 != &Token::OpenParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 72 - if &expr[index].0 != &Token::OpenParen { [INFO] [stdout] 72 + if expr[index].0 != Token::OpenParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:77:35 [INFO] [stdout] | [INFO] [stdout] 77 | let parameters_location = expr[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `expr[index].1` [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: unneeded `return` statement [INFO] [stdout] --> src/ast/mod.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 163 | / return Node::Comparison { [INFO] [stdout] 164 | | rexpr: (Box::new(parse_expr(&rexpr)), rexpr_location), [INFO] [stdout] 165 | | lexpr: (Box::new(parse_expr(&lexpr)), lexpr_location), [INFO] [stdout] 166 | | op: (operator, op_location), [INFO] [stdout] 167 | | }; [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] 163 ~ Node::Comparison { [INFO] [stdout] 164 + rexpr: (Box::new(parse_expr(&rexpr)), rexpr_location), [INFO] [stdout] 165 + lexpr: (Box::new(parse_expr(&lexpr)), lexpr_location), [INFO] [stdout] 166 + op: (operator, op_location), [INFO] [stdout] 167 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ast/mod.rs:137:31 [INFO] [stdout] | [INFO] [stdout] 137 | fn parse_condition(condition: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 137 - fn parse_condition(condition: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] 137 + fn parse_condition(condition: &[(Token, lexer::SourceLocation)]) -> Node { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 80 - while (&expr[index].0 != &Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] 80 + while (expr[index].0 != Token::CloseParen && indentation == 0) || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:140:26 [INFO] [stdout] | [INFO] [stdout] 140 | let lexpr_location = condition[0].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `condition[0].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:81:16 [INFO] [stdout] | [INFO] [stdout] 81 | if &expr[index].0 == &Token::OpenParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 81 - if &expr[index].0 == &Token::OpenParen { [INFO] [stdout] 81 + if expr[index].0 == Token::OpenParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:83:23 [INFO] [stdout] | [INFO] [stdout] 83 | } else if &expr[index].0 == &Token::CloseParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 83 - } else if &expr[index].0 == &Token::CloseParen { [INFO] [stdout] 83 + } else if expr[index].0 == Token::CloseParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:150:31 [INFO] [stdout] | [INFO] [stdout] 150 | op_location = condition[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `condition[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:86:16 [INFO] [stdout] | [INFO] [stdout] 86 | if &expr[index].0 == &Token::Comma { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 86 - if &expr[index].0 == &Token::Comma { [INFO] [stdout] 86 + if expr[index].0 == Token::Comma { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | rexpr_location = condition[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `condition[index].1` [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: length comparison to zero [INFO] [stdout] --> src/ast/mod.rs:94:12 [INFO] [stdout] | [INFO] [stdout] 94 | if parameter.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!parameter.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: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:98:35 [INFO] [stdout] | [INFO] [stdout] 98 | name: (ident.clone(), ident_location.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*ident_location` [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: this boolean expression can be simplified [INFO] [stdout] --> src/ast/mod.rs:187:23 [INFO] [stdout] | [INFO] [stdout] 187 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 187 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 187 + while !(&tokens[index].0 == &Token::CloseBrace && indentation == 0) { [INFO] [stdout] | [INFO] [stdout] 187 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 187 + while &tokens[index].0 != &Token::CloseBrace || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ast/mod.rs:317:23 [INFO] [stdout] | [INFO] [stdout] 317 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 317 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 317 + while !(&tokens[index].0 == &Token::CloseBrace && indentation == 0) { [INFO] [stdout] | [INFO] [stdout] 317 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 317 + while &tokens[index].0 != &Token::CloseBrace || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/ast/mod.rs:110:15 [INFO] [stdout] | [INFO] [stdout] 110 | while operator_found == false { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!operator_found` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast/mod.rs:346:5 [INFO] [stdout] | [INFO] [stdout] 346 | return ast; [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] 346 - return ast; [INFO] [stdout] 346 + ast [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:179:23 [INFO] [stdout] | [INFO] [stdout] 179 | while &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 179 - while &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] 179 + while tokens[index].0 != Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:187:24 [INFO] [stdout] | [INFO] [stdout] 187 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 187 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 187 + while (tokens[index].0 != Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:188:24 [INFO] [stdout] | [INFO] [stdout] 188 | if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 188 - if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] 188 + if tokens[index].0 == Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:190:31 [INFO] [stdout] | [INFO] [stdout] 190 | } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 190 - } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] 190 + } else if tokens[index].0 == Token::CloseBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:196:20 [INFO] [stdout] | [INFO] [stdout] 196 | if &tokens[index].0 != &Token::Keyword(lexer::Keyword::Else) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 196 - if &tokens[index].0 != &Token::Keyword(lexer::Keyword::Else) { [INFO] [stdout] 196 + if tokens[index].0 != Token::Keyword(lexer::Keyword::Else) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:207:70 [INFO] [stdout] | [INFO] [stdout] 207 | Token::Ident(identifier) => (identifier.clone(), tokens[index].1.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | if &tokens[index].0 != &Token::Colon { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 214 - if &tokens[index].0 != &Token::Colon { [INFO] [stdout] 214 + if tokens[index].0 != Token::Colon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:219:61 [INFO] [stdout] | [INFO] [stdout] 219 | Token::Type(typeid) => (typeid.clone(), tokens[index].1.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:226:20 [INFO] [stdout] | [INFO] [stdout] 226 | if &tokens[index].0 != &Token::Equal { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 226 - if &tokens[index].0 != &Token::Equal { [INFO] [stdout] 226 + if tokens[index].0 != Token::Equal { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:231:37 [INFO] [stdout] | [INFO] [stdout] 231 | let expr_location = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:232:23 [INFO] [stdout] | [INFO] [stdout] 232 | while &tokens[index].0 != &Token::Newline { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 232 - while &tokens[index].0 != &Token::Newline { [INFO] [stdout] 232 + while tokens[index].0 != Token::Newline { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:245:37 [INFO] [stdout] | [INFO] [stdout] 245 | let expr_location = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:246:23 [INFO] [stdout] | [INFO] [stdout] 246 | while &tokens[index].0 != &Token::Newline { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 246 - while &tokens[index].0 != &Token::Newline { [INFO] [stdout] 246 + while tokens[index].0 != Token::Newline { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Operator` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:113:33 [INFO] [stdout] | [INFO] [stdout] 113 | operator = (op.clone(), expr[index].1); [INFO] [stdout] | ^^^^^^^^^^ help: try dereferencing it: `*op` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:262:57 [INFO] [stdout] | [INFO] [stdout] 262 | function_name = (ident.clone(), tokens[index].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:269:20 [INFO] [stdout] | [INFO] [stdout] 269 | if &tokens[index].0 != &Token::OpenParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 269 - if &tokens[index].0 != &Token::OpenParen { [INFO] [stdout] 269 + if tokens[index].0 != Token::OpenParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:273:41 [INFO] [stdout] | [INFO] [stdout] 273 | function_parameters.1 = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:274:23 [INFO] [stdout] | [INFO] [stdout] 274 | while &tokens[index].0 != &Token::CloseParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 274 - while &tokens[index].0 != &Token::CloseParen { [INFO] [stdout] 274 + while tokens[index].0 != Token::CloseParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:280:96 [INFO] [stdout] | [INFO] [stdout] 280 | ... function_parameters.0.push((ident.clone(), typeid.clone(), tokens[index].1.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:281:40 [INFO] [stdout] | [INFO] [stdout] 281 | ... if &tokens[index + 1].0 == &Token::Comma { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 281 - if &tokens[index + 1].0 == &Token::Comma { [INFO] [stdout] 281 + if tokens[index + 1].0 == Token::Comma { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast/mod.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 163 | / return Node::Comparison { [INFO] [stdout] 164 | | rexpr: (Box::new(parse_expr(&rexpr)), rexpr_location), [INFO] [stdout] 165 | | lexpr: (Box::new(parse_expr(&lexpr)), lexpr_location), [INFO] [stdout] 166 | | op: (operator, op_location), [INFO] [stdout] 167 | | }; [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] 163 ~ Node::Comparison { [INFO] [stdout] 164 + rexpr: (Box::new(parse_expr(&rexpr)), rexpr_location), [INFO] [stdout] 165 + lexpr: (Box::new(parse_expr(&lexpr)), lexpr_location), [INFO] [stdout] 166 + op: (operator, op_location), [INFO] [stdout] 167 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:297:20 [INFO] [stdout] | [INFO] [stdout] 297 | if &tokens[index].0 != &Token::Colon { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 297 - if &tokens[index].0 != &Token::Colon { [INFO] [stdout] 297 + if tokens[index].0 != Token::Colon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:303:58 [INFO] [stdout] | [INFO] [stdout] 303 | function_type = (typeid.clone(), tokens[index].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:310:20 [INFO] [stdout] | [INFO] [stdout] 310 | if &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 310 - if &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] 310 + if tokens[index].0 != Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:315:37 [INFO] [stdout] | [INFO] [stdout] 315 | let body_location = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/ast/mod.rs:137:31 [INFO] [stdout] | [INFO] [stdout] 137 | fn parse_condition(condition: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 137 - fn parse_condition(condition: &Vec<(Token, lexer::SourceLocation)>) -> Node { [INFO] [stdout] 137 + fn parse_condition(condition: &[(Token, lexer::SourceLocation)]) -> Node { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:317:24 [INFO] [stdout] | [INFO] [stdout] 317 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 317 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 317 + while (tokens[index].0 != Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:140:26 [INFO] [stdout] | [INFO] [stdout] 140 | let lexpr_location = condition[0].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `condition[0].1` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:150:31 [INFO] [stdout] | [INFO] [stdout] 150 | op_location = condition[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `condition[index].1` [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 `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:158:22 [INFO] [stdout] | [INFO] [stdout] 158 | rexpr_location = condition[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `condition[index].1` [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: this boolean expression can be simplified [INFO] [stdout] --> src/ast/mod.rs:187:23 [INFO] [stdout] | [INFO] [stdout] 187 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 187 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 187 + while !(&tokens[index].0 == &Token::CloseBrace && indentation == 0) { [INFO] [stdout] | [INFO] [stdout] 187 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 187 + while &tokens[index].0 != &Token::CloseBrace || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ast/mod.rs:317:23 [INFO] [stdout] | [INFO] [stdout] 317 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 317 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 317 + while !(&tokens[index].0 == &Token::CloseBrace && indentation == 0) { [INFO] [stdout] | [INFO] [stdout] 317 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 317 + while &tokens[index].0 != &Token::CloseBrace || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:318:24 [INFO] [stdout] | [INFO] [stdout] 318 | if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 318 - if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] 318 + if tokens[index].0 == Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:320:31 [INFO] [stdout] | [INFO] [stdout] 320 | } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 320 - } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] 320 + } else if tokens[index].0 == Token::CloseBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ast/mod.rs:346:5 [INFO] [stdout] | [INFO] [stdout] 346 | return ast; [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] 346 - return ast; [INFO] [stdout] 346 + ast [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:335:23 [INFO] [stdout] | [INFO] [stdout] 335 | while &tokens[index].0 != &Token::Newline { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 335 - while &tokens[index].0 != &Token::Newline { [INFO] [stdout] 335 + while tokens[index].0 != Token::Newline { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast/mod.rs:339:20 [INFO] [stdout] | [INFO] [stdout] 339 | if expr.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!expr.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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:179:23 [INFO] [stdout] | [INFO] [stdout] 179 | while &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 179 - while &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] 179 + while tokens[index].0 != Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap_err` on `fd` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:19:62 [INFO] [stdout] | [INFO] [stdout] 18 | if fd.is_err() { [INFO] [stdout] | -------------- help: try: `if let Err() = fd` [INFO] [stdout] 19 | println!("Err: Failed to open '{}': {:?}", &args[1], fd.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:187:24 [INFO] [stdout] | [INFO] [stdout] 187 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 187 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 187 + while (tokens[index].0 != Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:188:24 [INFO] [stdout] | [INFO] [stdout] 188 | if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 188 - if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] 188 + if tokens[index].0 == Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:190:31 [INFO] [stdout] | [INFO] [stdout] 190 | } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 190 - } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] 190 + } else if tokens[index].0 == Token::CloseBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:196:20 [INFO] [stdout] | [INFO] [stdout] 196 | if &tokens[index].0 != &Token::Keyword(lexer::Keyword::Else) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 196 - if &tokens[index].0 != &Token::Keyword(lexer::Keyword::Else) { [INFO] [stdout] 196 + if tokens[index].0 != Token::Keyword(lexer::Keyword::Else) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:207:70 [INFO] [stdout] | [INFO] [stdout] 207 | Token::Ident(identifier) => (identifier.clone(), tokens[index].1.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | if &tokens[index].0 != &Token::Colon { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 214 - if &tokens[index].0 != &Token::Colon { [INFO] [stdout] 214 + if tokens[index].0 != Token::Colon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:219:61 [INFO] [stdout] | [INFO] [stdout] 219 | Token::Type(typeid) => (typeid.clone(), tokens[index].1.clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:226:20 [INFO] [stdout] | [INFO] [stdout] 226 | if &tokens[index].0 != &Token::Equal { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 226 - if &tokens[index].0 != &Token::Equal { [INFO] [stdout] 226 + if tokens[index].0 != Token::Equal { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:231:37 [INFO] [stdout] | [INFO] [stdout] 231 | let expr_location = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:232:23 [INFO] [stdout] | [INFO] [stdout] 232 | while &tokens[index].0 != &Token::Newline { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 232 - while &tokens[index].0 != &Token::Newline { [INFO] [stdout] 232 + while tokens[index].0 != Token::Newline { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:245:37 [INFO] [stdout] | [INFO] [stdout] 245 | let expr_location = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:246:23 [INFO] [stdout] | [INFO] [stdout] 246 | while &tokens[index].0 != &Token::Newline { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 246 - while &tokens[index].0 != &Token::Newline { [INFO] [stdout] 246 + while tokens[index].0 != Token::Newline { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:262:57 [INFO] [stdout] | [INFO] [stdout] 262 | function_name = (ident.clone(), tokens[index].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:269:20 [INFO] [stdout] | [INFO] [stdout] 269 | if &tokens[index].0 != &Token::OpenParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 269 - if &tokens[index].0 != &Token::OpenParen { [INFO] [stdout] 269 + if tokens[index].0 != Token::OpenParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:273:41 [INFO] [stdout] | [INFO] [stdout] 273 | function_parameters.1 = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:274:23 [INFO] [stdout] | [INFO] [stdout] 274 | while &tokens[index].0 != &Token::CloseParen { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 274 - while &tokens[index].0 != &Token::CloseParen { [INFO] [stdout] 274 + while tokens[index].0 != Token::CloseParen { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:280:96 [INFO] [stdout] | [INFO] [stdout] 280 | ... function_parameters.0.push((ident.clone(), typeid.clone(), tokens[index].1.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:281:40 [INFO] [stdout] | [INFO] [stdout] 281 | ... if &tokens[index + 1].0 == &Token::Comma { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 281 - if &tokens[index + 1].0 == &Token::Comma { [INFO] [stdout] 281 + if tokens[index + 1].0 == Token::Comma { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:297:20 [INFO] [stdout] | [INFO] [stdout] 297 | if &tokens[index].0 != &Token::Colon { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 297 - if &tokens[index].0 != &Token::Colon { [INFO] [stdout] 297 + if tokens[index].0 != Token::Colon { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:303:58 [INFO] [stdout] | [INFO] [stdout] 303 | function_type = (typeid.clone(), tokens[index].1.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:310:20 [INFO] [stdout] | [INFO] [stdout] 310 | if &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 310 - if &tokens[index].0 != &Token::OpenBrace { [INFO] [stdout] 310 + if tokens[index].0 != Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(usize, usize)` which implements the `Copy` trait [INFO] [stdout] --> src/ast/mod.rs:315:37 [INFO] [stdout] | [INFO] [stdout] 315 | let body_location = tokens[index].1.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `tokens[index].1` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:317:24 [INFO] [stdout] | [INFO] [stdout] 317 | while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 317 - while (&tokens[index].0 != &Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] 317 + while (tokens[index].0 != Token::CloseBrace && indentation == 0) || indentation != 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:318:24 [INFO] [stdout] | [INFO] [stdout] 318 | if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 318 - if &tokens[index].0 == &Token::OpenBrace { [INFO] [stdout] 318 + if tokens[index].0 == Token::OpenBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:320:31 [INFO] [stdout] | [INFO] [stdout] 320 | } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 320 - } else if &tokens[index].0 == &Token::CloseBrace { [INFO] [stdout] 320 + } else if tokens[index].0 == Token::CloseBrace { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/ast/mod.rs:335:23 [INFO] [stdout] | [INFO] [stdout] 335 | while &tokens[index].0 != &Token::Newline { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 335 - while &tokens[index].0 != &Token::Newline { [INFO] [stdout] 335 + while tokens[index].0 != Token::Newline { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/ast/mod.rs:339:20 [INFO] [stdout] | [INFO] [stdout] 339 | if expr.len() != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!expr.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: called `unwrap_err` on `fd` after checking its variant with `is_err` [INFO] [stdout] --> src/main.rs:19:62 [INFO] [stdout] | [INFO] [stdout] 18 | if fd.is_err() { [INFO] [stdout] | -------------- help: try: `if let Err() = fd` [INFO] [stdout] 19 | println!("Err: Failed to open '{}': {:?}", &args[1], fd.unwrap_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s [INFO] running `Command { std: "docker" "inspect" "96c37b6dd10b0332d9b11c0cb7cb2d1aabb92774cd213784911beb932330e718", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "96c37b6dd10b0332d9b11c0cb7cb2d1aabb92774cd213784911beb932330e718", kill_on_drop: false }` [INFO] [stdout] 96c37b6dd10b0332d9b11c0cb7cb2d1aabb92774cd213784911beb932330e718