[INFO] cloning repository https://github.com/mohammad-ayan-008/tlang [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mohammad-ayan-008/tlang" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmohammad-ayan-008%2Ftlang", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmohammad-ayan-008%2Ftlang'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ce121d00a03383130b83120f68293494d49cebf9 [INFO] linting mohammad-ayan-008/tlang against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmohammad-ayan-008%2Ftlang" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mohammad-ayan-008/tlang [INFO] finished tweaking git repo https://github.com/mohammad-ayan-008/tlang [INFO] tweaked toml for git repo https://github.com/mohammad-ayan-008/tlang written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mohammad-ayan-008/tlang 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/mohammad-ayan-008/tlang 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] Downloading crates ... [INFO] [stderr] Downloaded llvm-sys v181.2.0 [INFO] [stderr] Downloaded inkwell_internals v0.11.0 [INFO] [stderr] Downloaded inkwell v0.6.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 6a775f862511f1f864645e285ca7f0572942b110b689eee9a4ee74bedb0bf763 [INFO] running `Command { std: "docker" "start" "-a" "6a775f862511f1f864645e285ca7f0572942b110b689eee9a4ee74bedb0bf763", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6a775f862511f1f864645e285ca7f0572942b110b689eee9a4ee74bedb0bf763", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a775f862511f1f864645e285ca7f0572942b110b689eee9a4ee74bedb0bf763", kill_on_drop: false }` [INFO] [stdout] 6a775f862511f1f864645e285ca7f0572942b110b689eee9a4ee74bedb0bf763 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 55f8dc413f247f1e89b99b5cece6a40f9cccf744f1451c211350ab281533180e [INFO] running `Command { std: "docker" "start" "-a" "55f8dc413f247f1e89b99b5cece6a40f9cccf744f1451c211350ab281533180e", kill_on_drop: false }` [INFO] [stderr] Compiling semver v1.0.26 [INFO] [stderr] Compiling libc v0.2.176 [INFO] [stderr] Compiling inkwell v0.6.0 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Compiling anyhow v1.0.99 [INFO] [stderr] Compiling cc v1.2.34 [INFO] [stderr] Compiling syn v2.0.106 [INFO] [stderr] Compiling llvm-sys v181.2.0 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling inkwell_internals v0.11.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking testlang v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `BufRead`, `Write`, `stdin`, and `stdout` [INFO] [stdout] --> src/main.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | io::{BufRead, Write, stdin, stdout}, [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `env::set_var` [INFO] [stdout] --> src/codegen.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, env::set_var, ops::Deref, panic}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/codegen.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | context::{self, Context}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `self` and `token::Literal` [INFO] [stdout] --> src/codegen.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | expr::{self, Expr, LiteralValue}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | stmt::Stmt, [INFO] [stdout] 15 | token::Literal, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cell::RefCell`, `format`, `rc::Rc`, `result`, `usize`, and `write` [INFO] [stdout] --> src/expr.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | cell::RefCell, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 3 | fmt::{Debug, format, write}, [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] 4 | rc::Rc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 5 | result, usize, [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokentype::TokenType` [INFO] [stdout] --> src/expr.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | tokentype::TokenType, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `any::type_name` and `string` [INFO] [stdout] --> src/lexer.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{any::type_name, collections::HashMap, string, usize}; [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `env`, `process::id`, and `result` [INFO] [stdout] --> src/parser.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{env, process::id, result, usize, vec}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Literal`, `self`, and `self` [INFO] [stdout] --> src/parser.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | expr::{self, Expr, LiteralValue}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 5 | stmt::Stmt, [INFO] [stdout] 6 | token::{self, Literal, Token}, [INFO] [stdout] | ^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/token.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | LEFT_PAREN, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftParen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RIGHT_PAREN, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightParen` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | LEFT_BRACE, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RIGHT_BRACE, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BANG_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | BANG_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `BangEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EQUAL_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | EQUAL_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `EqualEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `GREATER_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | GREATER_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GreaterEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LESS_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | LESS_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LessEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BufRead`, `Write`, `stdin`, and `stdout` [INFO] [stdout] --> src/main.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | io::{BufRead, Write, stdin, stdout}, [INFO] [stdout] | ^^^^^^^ ^^^^^ ^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `env::set_var` [INFO] [stdout] --> src/codegen.rs:1:33 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::HashMap, env::set_var, ops::Deref, panic}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/codegen.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | context::{self, Context}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `self` and `token::Literal` [INFO] [stdout] --> src/codegen.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | expr::{self, Expr, LiteralValue}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | stmt::Stmt, [INFO] [stdout] 15 | token::Literal, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cell::RefCell`, `format`, `rc::Rc`, `result`, `usize`, and `write` [INFO] [stdout] --> src/expr.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | cell::RefCell, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 3 | fmt::{Debug, format, write}, [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] 4 | rc::Rc, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 5 | result, usize, [INFO] [stdout] | ^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokentype::TokenType` [INFO] [stdout] --> src/expr.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | tokentype::TokenType, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `any::type_name` and `string` [INFO] [stdout] --> src/lexer.rs:2:11 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{any::type_name, collections::HashMap, string, usize}; [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `env`, `process::id`, and `result` [INFO] [stdout] --> src/parser.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{env, process::id, result, usize, vec}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Literal`, `self`, and `self` [INFO] [stdout] --> src/parser.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | expr::{self, Expr, LiteralValue}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 5 | stmt::Stmt, [INFO] [stdout] 6 | token::{self, Literal, Token}, [INFO] [stdout] | ^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:257:65 [INFO] [stdout] | [INFO] [stdout] 257 | (TokenType::MINUS, BasicTypeEnum::FloatType(a)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:286:47 [INFO] [stdout] | [INFO] [stdout] 286 | (BasicTypeEnum::FloatType(a), TokenType::PLUS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:286:93 [INFO] [stdout] | [INFO] [stdout] 286 | (BasicTypeEnum::FloatType(a), TokenType::PLUS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/token.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | LEFT_PAREN, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftParen` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_PAREN` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | RIGHT_PAREN, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightParen` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LEFT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | LEFT_BRACE, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LeftBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `RIGHT_BRACE` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | RIGHT_BRACE, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `RightBrace` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:300:50 [INFO] [stdout] | [INFO] [stdout] 300 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:302:50 [INFO] [stdout] | [INFO] [stdout] 302 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `BANG_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | BANG_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `BangEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:314:47 [INFO] [stdout] | [INFO] [stdout] 314 | (BasicTypeEnum::FloatType(a), TokenType::STAR, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:314:93 [INFO] [stdout] | [INFO] [stdout] 314 | (BasicTypeEnum::FloatType(a), TokenType::STAR, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EQUAL_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | EQUAL_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `EqualEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:328:50 [INFO] [stdout] | [INFO] [stdout] 328 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:330:50 [INFO] [stdout] | [INFO] [stdout] 330 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `GREATER_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | GREATER_EQUAL, [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `GreaterEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:343:50 [INFO] [stdout] | [INFO] [stdout] 343 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:345:50 [INFO] [stdout] | [INFO] [stdout] 345 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `LESS_EQUAL` should have an upper camel case name [INFO] [stdout] --> src/tokentype.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | LESS_EQUAL, [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `LessEqual` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:358:47 [INFO] [stdout] | [INFO] [stdout] 358 | (BasicTypeEnum::FloatType(a), TokenType::LESS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:358:93 [INFO] [stdout] | [INFO] [stdout] 358 | (BasicTypeEnum::FloatType(a), TokenType::LESS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:373:50 [INFO] [stdout] | [INFO] [stdout] 373 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:375:50 [INFO] [stdout] | [INFO] [stdout] 375 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:389:50 [INFO] [stdout] | [INFO] [stdout] 389 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:391:50 [INFO] [stdout] | [INFO] [stdout] 391 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:405:50 [INFO] [stdout] | [INFO] [stdout] 405 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:407:50 [INFO] [stdout] | [INFO] [stdout] 407 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:421:50 [INFO] [stdout] | [INFO] [stdout] 421 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:423:50 [INFO] [stdout] | [INFO] [stdout] 423 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kind` [INFO] [stdout] --> src/parser.rs:55:32 [INFO] [stdout] | [INFO] [stdout] 55 | fn funtion_decl(&mut self, kind: &str) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] 56 | let token = self.consume(TokenType::IDENTIFIER, "Expected {kind} name")?; [INFO] [stdout] | ---------------------- you might have meant to use string interpolation in this string literal [INFO] [stdout] 57 | self.consume(TokenType::LEFT_PAREN, "Expected '(' after {kind} name"); [INFO] [stdout] | --------------------------------- you might have meant to use string interpolation in this string literal [INFO] [stdout] | [INFO] [stdout] help: string interpolation only works in `format!` invocations [INFO] [stdout] | [INFO] [stdout] 56 | let token = self.consume(TokenType::IDENTIFIER, format!("Expected {kind} name"))?; [INFO] [stdout] | ++++++++ + [INFO] [stdout] help: string interpolation only works in `format!` invocations [INFO] [stdout] | [INFO] [stdout] 57 | self.consume(TokenType::LEFT_PAREN, format!("Expected '(' after {kind} name")); [INFO] [stdout] | ++++++++ + [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 55 | fn funtion_decl(&mut self, _kind: &str) -> Result { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | let mut body; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `token` [INFO] [stdout] --> src/parser.rs:428:13 [INFO] [stdout] | [INFO] [stdout] 428 | let token = self.previous(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_token` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `load_if_pointer` is never used [INFO] [stdout] --> src/codegen.rs:471:8 [INFO] [stdout] | [INFO] [stdout] 29 | impl<'ctx> Compiler<'ctx> { [INFO] [stdout] | ------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 471 | fn load_if_pointer(&mut self, value: BasicValueEnum<'ctx>) -> BasicValueEnum<'ctx> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `is_truthy`, `is_falsy`, `from_bool`, and `to_type` are never used [INFO] [stdout] --> src/expr.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 37 | impl LiteralValue { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 38 | pub fn is_truthy(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn is_falsy(&self) -> LiteralValue { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | pub fn from_bool(b: bool) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn to_type(&self) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `params`, and `body` are never read [INFO] [stdout] --> src/stmt.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | Function { [INFO] [stdout] | -------- fields in this variant [INFO] [stdout] 28 | name: Token, [INFO] [stdout] | ^^^^ [INFO] [stdout] 29 | params: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 30 | body: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `token` and `expr` are never read [INFO] [stdout] --> src/stmt.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | Return { [INFO] [stdout] | ------ fields in this variant [INFO] [stdout] 33 | token: Token, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 34 | expr: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `ILiteral` and `IdentifierLiteral` are never constructed [INFO] [stdout] --> src/token.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum Literal { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 9 | ILiteral(i64), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 10 | IdentifierLiteral(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Literal` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `BasicValueEnum<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/codegen.rs:198:32 [INFO] [stdout] | [INFO] [stdout] 198 | let format_str = match value.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `value` [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: useless conversion to the same type: `inkwell::values::FloatValue<'_>` [INFO] [stdout] --> src/codegen.rs:262:53 [INFO] [stdout] | [INFO] [stdout] 262 | ... .build_float_mul(value, mul.into(), "mul") [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/expr.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | result, usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / match self { [INFO] [stdout] 40 | | LiteralValue::False | LiteralValue::Nil => false, [INFO] [stdout] 41 | | _ => true, [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 39 - match self { [INFO] [stdout] 40 - LiteralValue::False | LiteralValue::Nil => false, [INFO] [stdout] 41 - _ => true, [INFO] [stdout] 42 - } [INFO] [stdout] 39 + !matches!(self, LiteralValue::False | LiteralValue::Nil) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | if s.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/expr.rs:138:39 [INFO] [stdout] | [INFO] [stdout] 138 | Some(Literal::FLiteral(x)) => x as f64, [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/lexer.rs:2:57 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{any::type_name, collections::HashMap, string, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:257:65 [INFO] [stdout] | [INFO] [stdout] 257 | (TokenType::MINUS, BasicTypeEnum::FloatType(a)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:286:47 [INFO] [stdout] | [INFO] [stdout] 286 | (BasicTypeEnum::FloatType(a), TokenType::PLUS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:286:93 [INFO] [stdout] | [INFO] [stdout] 286 | (BasicTypeEnum::FloatType(a), TokenType::PLUS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:300:50 [INFO] [stdout] | [INFO] [stdout] 300 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:302:50 [INFO] [stdout] | [INFO] [stdout] 302 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:314:47 [INFO] [stdout] | [INFO] [stdout] 314 | (BasicTypeEnum::FloatType(a), TokenType::STAR, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lexer.rs:110:16 [INFO] [stdout] | [INFO] [stdout] 110 | if let None = t { [INFO] [stdout] | -------^^^^---- help: try: `if t.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:314:93 [INFO] [stdout] | [INFO] [stdout] 314 | (BasicTypeEnum::FloatType(a), TokenType::STAR, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:328:50 [INFO] [stdout] | [INFO] [stdout] 328 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:330:50 [INFO] [stdout] | [INFO] [stdout] 330 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:343:50 [INFO] [stdout] | [INFO] [stdout] 343 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:345:50 [INFO] [stdout] | [INFO] [stdout] 345 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:358:47 [INFO] [stdout] | [INFO] [stdout] 358 | (BasicTypeEnum::FloatType(a), TokenType::LESS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:358:93 [INFO] [stdout] | [INFO] [stdout] 358 | (BasicTypeEnum::FloatType(a), TokenType::LESS, BasicTypeEnum::FloatType(b)) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:373:50 [INFO] [stdout] | [INFO] [stdout] 373 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:375:50 [INFO] [stdout] | [INFO] [stdout] 375 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:389:50 [INFO] [stdout] | [INFO] [stdout] 389 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:391:50 [INFO] [stdout] | [INFO] [stdout] 391 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:405:50 [INFO] [stdout] | [INFO] [stdout] 405 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:407:50 [INFO] [stdout] | [INFO] [stdout] 407 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/codegen.rs:421:50 [INFO] [stdout] | [INFO] [stdout] 421 | BasicTypeEnum::FloatType(a), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/codegen.rs:423:50 [INFO] [stdout] | [INFO] [stdout] 423 | BasicTypeEnum::FloatType(b), [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:157:43 [INFO] [stdout] | [INFO] [stdout] 157 | let char = self.source.as_bytes()[self.current as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:172:22 [INFO] [stdout] | [INFO] [stdout] 172 | .nth((self.current + 1) as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((self.current + 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:190:32 [INFO] [stdout] | [INFO] [stdout] 190 | let text = self.source[self.start as usize..self.current as usize].to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:190:53 [INFO] [stdout] | [INFO] [stdout] 190 | let text = self.source[self.start as usize..self.current as usize].to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lexer.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lexer.rs:221:33 [INFO] [stdout] | [INFO] [stdout] 221 | c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lexer.rs:229:9 [INFO] [stdout] | [INFO] [stdout] 229 | c >= '0' && c <= '9' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{env, process::id, result, usize, vec}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/parser.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let init; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `init` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 85 ~ [INFO] [stdout] 86 ~ let init = if self.match_tokens(&[TokenType::EQUAL]) { [INFO] [stdout] 87 ~ self.expression() [INFO] [stdout] 88 | } else { [INFO] [stdout] 89 ~ Ok(Expr::Literal { [INFO] [stdout] 90 | value: LiteralValue::Nil, [INFO] [stdout] 91 ~ }) [INFO] [stdout] 92 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:176:12 [INFO] [stdout] | [INFO] [stdout] 176 | if !increment.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `increment.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `increment` after checking its variant with `is_none` [INFO] [stdout] --> src/parser.rs:179:33 [INFO] [stdout] | [INFO] [stdout] 176 | if !increment.is_none() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 179 | expression: increment.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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: unused variable: `kind` [INFO] [stdout] --> src/parser.rs:55:32 [INFO] [stdout] | [INFO] [stdout] 55 | fn funtion_decl(&mut self, kind: &str) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] 56 | let token = self.consume(TokenType::IDENTIFIER, "Expected {kind} name")?; [INFO] [stdout] | ---------------------- you might have meant to use string interpolation in this string literal [INFO] [stdout] 57 | self.consume(TokenType::LEFT_PAREN, "Expected '(' after {kind} name"); [INFO] [stdout] | --------------------------------- you might have meant to use string interpolation in this string literal [INFO] [stdout] | [INFO] [stdout] help: string interpolation only works in `format!` invocations [INFO] [stdout] | [INFO] [stdout] 56 | let token = self.consume(TokenType::IDENTIFIER, format!("Expected {kind} name"))?; [INFO] [stdout] | ++++++++ + [INFO] [stdout] help: string interpolation only works in `format!` invocations [INFO] [stdout] | [INFO] [stdout] 57 | self.consume(TokenType::LEFT_PAREN, format!("Expected '(' after {kind} name")); [INFO] [stdout] | ++++++++ + [INFO] [stdout] help: if this is intentional, prefix it with an underscore [INFO] [stdout] | [INFO] [stdout] 55 | fn funtion_decl(&mut self, _kind: &str) -> Result { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/parser.rs:170:13 [INFO] [stdout] | [INFO] [stdout] 170 | let mut body; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/parser.rs:439:9 [INFO] [stdout] | [INFO] [stdout] 439 | let result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `result` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 439 ~ [INFO] [stdout] 440 ~ let result = match token.token_type { [INFO] [stdout] 441 | TokenType::LEFT_PAREN => { [INFO] [stdout] ... [INFO] [stdout] 444 | self.consume(TokenType::RIGHT_PAREN, "Expected ')'")?; [INFO] [stdout] 445 ~ Expr::Grouping { [INFO] [stdout] 446 | expression: Box::from(expr), [INFO] [stdout] ... [INFO] [stdout] 454 | self.advance(); [INFO] [stdout] 455 ~ Expr::Literal { [INFO] [stdout] 456 | value: LiteralValue::from_token(token), [INFO] [stdout] ... [INFO] [stdout] 460 | self.advance(); [INFO] [stdout] 461 ~ Expr::Variable { [INFO] [stdout] 462 | name: self.previous(), [INFO] [stdout] ... [INFO] [stdout] 471 | } [INFO] [stdout] 472 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `token` [INFO] [stdout] --> src/parser.rs:428:13 [INFO] [stdout] | [INFO] [stdout] 428 | let token = self.previous(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_token` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:484:13 [INFO] [stdout] | [INFO] [stdout] 484 | return Err(format!("{} at line {}", msg.to_string(), token.line)); [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] 484 - return Err(format!("{} at line {}", msg.to_string(), token.line)); [INFO] [stdout] 484 + Err(format!("{} at line {}", msg.to_string(), token.line)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/parser.rs:484:52 [INFO] [stdout] | [INFO] [stdout] 484 | return Err(format!("{} at line {}", msg.to_string(), token.line)); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/parser.rs:521:40 [INFO] [stdout] | [INFO] [stdout] 521 | self.tokens.get(self.current - 1 as usize).unwrap().clone() [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WHILE` contains a capitalized acronym [INFO] [stdout] --> src/stmt.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | WHILE { [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `While` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | StringLiteral(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | FLiteral(f64), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | ILiteral(i64), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | IdentifierLiteral(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Literal` [INFO] [stdout] --> src/token.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub enum Literal { [INFO] [stdout] 7 | | StringLiteral(String), [INFO] [stdout] 8 | | FLiteral(f64), [INFO] [stdout] 9 | | ILiteral(i64), [INFO] [stdout] 10 | | IdentifierLiteral(String), [INFO] [stdout] 11 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `load_if_pointer` is never used [INFO] [stdout] --> src/codegen.rs:471:8 [INFO] [stdout] | [INFO] [stdout] 29 | impl<'ctx> Compiler<'ctx> { [INFO] [stdout] | ------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 471 | fn load_if_pointer(&mut self, value: BasicValueEnum<'ctx>) -> BasicValueEnum<'ctx> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `is_truthy`, `is_falsy`, `from_bool`, and `to_type` are never used [INFO] [stdout] --> src/expr.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 37 | impl LiteralValue { [INFO] [stdout] | ----------------- associated items in this implementation [INFO] [stdout] 38 | pub fn is_truthy(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | pub fn is_falsy(&self) -> LiteralValue { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 66 | pub fn from_bool(b: bool) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 70 | pub fn to_type(&self) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `params`, and `body` are never read [INFO] [stdout] --> src/stmt.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | Function { [INFO] [stdout] | -------- fields in this variant [INFO] [stdout] 28 | name: Token, [INFO] [stdout] | ^^^^ [INFO] [stdout] 29 | params: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 30 | body: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `token` and `expr` are never read [INFO] [stdout] --> src/stmt.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | Return { [INFO] [stdout] | ------ fields in this variant [INFO] [stdout] 33 | token: Token, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 34 | expr: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Stmt` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `ILiteral` and `IdentifierLiteral` are never constructed [INFO] [stdout] --> src/token.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | pub enum Literal { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 9 | ILiteral(i64), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 10 | IdentifierLiteral(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Literal` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/token.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / impl ToString for Token { [INFO] [stdout] 22 | | fn to_string(&self) -> String { [INFO] [stdout] 23 | | format!( [INFO] [stdout] 24 | | " {:?} {} {:?}", [INFO] [stdout] ... | [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `COMMA` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | COMMA, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Comma` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | DOT, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Dot` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MINUS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | MINUS, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Minus` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PLUS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | PLUS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Plus` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SEMICOLON` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | SEMICOLON, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SLASH` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | SLASH, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Slash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STAR` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | STAR, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Star` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BANG` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | BANG, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Bang` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EQUAL` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | EQUAL, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Equal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GREATER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | GREATER, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Greater` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LESS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | LESS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Less` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FLOAT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | FLOAT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Float` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IDENTIFIER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | IDENTIFIER, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Identifier` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STRINGLIT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | STRINGLIT, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Stringlit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NUMBER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | NUMBER, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CLASS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | CLASS, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Class` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ELSE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | ELSE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Else` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FALSE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | FALSE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `False` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FUN` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | FUN, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Fun` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FOR` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | FOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `For` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NIL` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | NIL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Nil` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PRINT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | PRINT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Print` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RETURN` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | RETURN, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Return` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SUPER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | SUPER, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Super` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `THIS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | THIS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `This` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TRUE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | TRUE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `True` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | INT, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Int` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STRING` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | STRING, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `String` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BOOL` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | BOOL, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Bool` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WHILE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | WHILE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `While` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EOF` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | EOF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eof` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BREAK` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | BREAK, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Break` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CONTINUE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | CONTINUE, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Continue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `scanTokens` should have a snake case name [INFO] [stdout] --> src/lexer.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn scanTokens(mut self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `scan_tokens` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `scanToken` should have a snake case name [INFO] [stdout] --> src/lexer.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | fn scanToken(&mut self) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `scan_token` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/parser.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | self.consume(TokenType::LEFT_PAREN, "Expected '(' after {kind} name"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 57 | let _ = self.consume(TokenType::LEFT_PAREN, "Expected '(' after {kind} name"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `finishCall` should have a snake case name [INFO] [stdout] --> src/parser.rs:415:8 [INFO] [stdout] | [INFO] [stdout] 415 | fn finishCall(&mut self, callie: Expr) -> Result { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `finish_call` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `BasicValueEnum<'_>` which implements the `Copy` trait [INFO] [stdout] --> src/codegen.rs:198:32 [INFO] [stdout] | [INFO] [stdout] 198 | let format_str = match value.clone() { [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `value` [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: useless conversion to the same type: `inkwell::values::FloatValue<'_>` [INFO] [stdout] --> src/codegen.rs:262:53 [INFO] [stdout] | [INFO] [stdout] 262 | ... .build_float_mul(value, mul.into(), "mul") [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `mul` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/expr.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | result, usize, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/expr.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / match self { [INFO] [stdout] 40 | | LiteralValue::False | LiteralValue::Nil => false, [INFO] [stdout] 41 | | _ => true, [INFO] [stdout] 42 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 39 - match self { [INFO] [stdout] 40 - LiteralValue::False | LiteralValue::Nil => false, [INFO] [stdout] 41 - _ => true, [INFO] [stdout] 42 - } [INFO] [stdout] 39 + !matches!(self, LiteralValue::False | LiteralValue::Nil) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/expr.rs:55:20 [INFO] [stdout] | [INFO] [stdout] 55 | if s.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s.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: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/expr.rs:138:39 [INFO] [stdout] | [INFO] [stdout] 138 | Some(Literal::FLiteral(x)) => x as f64, [INFO] [stdout] | ^^^^^^^^ help: try: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/lexer.rs:2:57 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{any::type_name, collections::HashMap, string, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/lexer.rs:110:16 [INFO] [stdout] | [INFO] [stdout] 110 | if let None = t { [INFO] [stdout] | -------^^^^---- help: try: `if t.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:157:43 [INFO] [stdout] | [INFO] [stdout] 157 | let char = self.source.as_bytes()[self.current as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:172:22 [INFO] [stdout] | [INFO] [stdout] 172 | .nth((self.current + 1) as usize) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((self.current + 1))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:190:32 [INFO] [stdout] | [INFO] [stdout] 190 | let text = self.source[self.start as usize..self.current as usize].to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `self.start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lexer.rs:190:53 [INFO] [stdout] | [INFO] [stdout] 190 | let text = self.source[self.start as usize..self.current as usize].to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lexer.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('a'..='z').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lexer.rs:221:33 [INFO] [stdout] | [INFO] [stdout] 221 | c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('A'..='Z').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/lexer.rs:229:9 [INFO] [stdout] | [INFO] [stdout] 229 | c >= '0' && c <= '9' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&c)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/parser.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{env, process::id, result, usize, vec}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/parser.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let init; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `init` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 85 ~ [INFO] [stdout] 86 ~ let init = if self.match_tokens(&[TokenType::EQUAL]) { [INFO] [stdout] 87 ~ self.expression() [INFO] [stdout] 88 | } else { [INFO] [stdout] 89 ~ Ok(Expr::Literal { [INFO] [stdout] 90 | value: LiteralValue::Nil, [INFO] [stdout] 91 ~ }) [INFO] [stdout] 92 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:176:12 [INFO] [stdout] | [INFO] [stdout] 176 | if !increment.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `increment.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `increment` after checking its variant with `is_none` [INFO] [stdout] --> src/parser.rs:179:33 [INFO] [stdout] | [INFO] [stdout] 176 | if !increment.is_none() { [INFO] [stdout] | ------------------- the check is happening here [INFO] [stdout] ... [INFO] [stdout] 179 | expression: increment.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `if let` or `match` [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 late initialization [INFO] [stdout] --> src/parser.rs:439:9 [INFO] [stdout] | [INFO] [stdout] 439 | let result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `result` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 439 ~ [INFO] [stdout] 440 ~ let result = match token.token_type { [INFO] [stdout] 441 | TokenType::LEFT_PAREN => { [INFO] [stdout] ... [INFO] [stdout] 444 | self.consume(TokenType::RIGHT_PAREN, "Expected ')'")?; [INFO] [stdout] 445 ~ Expr::Grouping { [INFO] [stdout] 446 | expression: Box::from(expr), [INFO] [stdout] ... [INFO] [stdout] 454 | self.advance(); [INFO] [stdout] 455 ~ Expr::Literal { [INFO] [stdout] 456 | value: LiteralValue::from_token(token), [INFO] [stdout] ... [INFO] [stdout] 460 | self.advance(); [INFO] [stdout] 461 ~ Expr::Variable { [INFO] [stdout] 462 | name: self.previous(), [INFO] [stdout] ... [INFO] [stdout] 471 | } [INFO] [stdout] 472 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/parser.rs:484:13 [INFO] [stdout] | [INFO] [stdout] 484 | return Err(format!("{} at line {}", msg.to_string(), token.line)); [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] 484 - return Err(format!("{} at line {}", msg.to_string(), token.line)); [INFO] [stdout] 484 + Err(format!("{} at line {}", msg.to_string(), token.line)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/parser.rs:484:52 [INFO] [stdout] | [INFO] [stdout] 484 | return Err(format!("{} at line {}", msg.to_string(), token.line)); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/parser.rs:521:40 [INFO] [stdout] | [INFO] [stdout] 521 | self.tokens.get(self.current - 1 as usize).unwrap().clone() [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WHILE` contains a capitalized acronym [INFO] [stdout] --> src/stmt.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | WHILE { [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `While` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | StringLiteral(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | FLiteral(f64), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | ILiteral(i64), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/token.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | IdentifierLiteral(String), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Literal` [INFO] [stdout] --> src/token.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / pub enum Literal { [INFO] [stdout] 7 | | StringLiteral(String), [INFO] [stdout] 8 | | FLiteral(f64), [INFO] [stdout] 9 | | ILiteral(i64), [INFO] [stdout] 10 | | IdentifierLiteral(String), [INFO] [stdout] 11 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct implementation of `ToString` [INFO] [stdout] --> src/token.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / impl ToString for Token { [INFO] [stdout] 22 | | fn to_string(&self) -> String { [INFO] [stdout] 23 | | format!( [INFO] [stdout] 24 | | " {:?} {} {:?}", [INFO] [stdout] ... | [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `COMMA` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | COMMA, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Comma` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `DOT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | DOT, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Dot` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MINUS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | MINUS, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Minus` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PLUS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | PLUS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Plus` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SEMICOLON` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | SEMICOLON, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Semicolon` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SLASH` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | SLASH, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Slash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STAR` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | STAR, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Star` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BANG` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | BANG, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Bang` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EQUAL` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | EQUAL, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Equal` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `GREATER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | GREATER, [INFO] [stdout] | ^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Greater` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LESS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | LESS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Less` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FLOAT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | FLOAT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Float` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `IDENTIFIER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | IDENTIFIER, [INFO] [stdout] | ^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Identifier` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STRINGLIT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | STRINGLIT, [INFO] [stdout] | ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Stringlit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NUMBER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | NUMBER, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Number` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `AND` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | AND, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `And` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CLASS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | CLASS, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Class` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `ELSE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | ELSE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Else` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FALSE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | FALSE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `False` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FUN` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | FUN, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Fun` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `FOR` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | FOR, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `For` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `NIL` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | NIL, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Nil` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `PRINT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | PRINT, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Print` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RETURN` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | RETURN, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Return` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `SUPER` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | SUPER, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Super` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `THIS` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | THIS, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `This` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TRUE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | TRUE, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `True` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `INT` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | INT, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Int` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `STRING` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | STRING, [INFO] [stdout] | ^^^^^^ help: consider making the acronym lowercase, except the initial letter: `String` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BOOL` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | BOOL, [INFO] [stdout] | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Bool` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `WHILE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:50:5 [INFO] [stdout] | [INFO] [stdout] 50 | WHILE, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `While` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `EOF` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | EOF, [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Eof` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `BREAK` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | BREAK, [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Break` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `CONTINUE` contains a capitalized acronym [INFO] [stdout] --> src/tokentype.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | CONTINUE, [INFO] [stdout] | ^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `Continue` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `scanTokens` should have a snake case name [INFO] [stdout] --> src/lexer.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn scanTokens(mut self) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `scan_tokens` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `scanToken` should have a snake case name [INFO] [stdout] --> src/lexer.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | fn scanToken(&mut self) { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `scan_token` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/parser.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | self.consume(TokenType::LEFT_PAREN, "Expected '(' after {kind} name"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 57 | let _ = self.consume(TokenType::LEFT_PAREN, "Expected '(' after {kind} name"); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `finishCall` should have a snake case name [INFO] [stdout] --> src/parser.rs:415:8 [INFO] [stdout] | [INFO] [stdout] 415 | fn finishCall(&mut self, callie: Expr) -> Result { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `finish_call` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.46s [INFO] running `Command { std: "docker" "inspect" "55f8dc413f247f1e89b99b5cece6a40f9cccf744f1451c211350ab281533180e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "55f8dc413f247f1e89b99b5cece6a40f9cccf744f1451c211350ab281533180e", kill_on_drop: false }` [INFO] [stdout] 55f8dc413f247f1e89b99b5cece6a40f9cccf744f1451c211350ab281533180e