[INFO] cloning repository https://github.com/CunningBard/Yet-Another-Programming-Language [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/CunningBard/Yet-Another-Programming-Language" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCunningBard%2FYet-Another-Programming-Language", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCunningBard%2FYet-Another-Programming-Language'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b98d363f0010fc231461add6e5bf3d9a3061aff8 [INFO] linting CunningBard/Yet-Another-Programming-Language against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCunningBard%2FYet-Another-Programming-Language" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/CunningBard/Yet-Another-Programming-Language [INFO] finished tweaking git repo https://github.com/CunningBard/Yet-Another-Programming-Language [INFO] tweaked toml for git repo https://github.com/CunningBard/Yet-Another-Programming-Language written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/CunningBard/Yet-Another-Programming-Language 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/CunningBard/Yet-Another-Programming-Language already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: unused manifest key: target.x86_64-unknown-linux-gnu.rustflags [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] ea92425e695bf0fc33af79da36d26fa9918d372f7df1c017593a069ab5f44219 [INFO] running `Command { std: "docker" "start" "-a" "ea92425e695bf0fc33af79da36d26fa9918d372f7df1c017593a069ab5f44219", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ea92425e695bf0fc33af79da36d26fa9918d372f7df1c017593a069ab5f44219", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ea92425e695bf0fc33af79da36d26fa9918d372f7df1c017593a069ab5f44219", kill_on_drop: false }` [INFO] [stdout] ea92425e695bf0fc33af79da36d26fa9918d372f7df1c017593a069ab5f44219 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 95d95abc52bee9ca2e87f69f2f769d7035257757a0ed364ffac8b5b6550e69bf [INFO] running `Command { std: "docker" "start" "-a" "95d95abc52bee9ca2e87f69f2f769d7035257757a0ed364ffac8b5b6550e69bf", kill_on_drop: false }` [INFO] [stderr] warning: unused manifest key: target.x86_64-unknown-linux-gnu.rustflags [INFO] [stderr] Checking yapl v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/compiler.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [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: `std::fmt::format` [INFO] [stdout] --> src/compiler.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pass` is never used [INFO] [stdout] --> src/parser.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn pass() [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_token_ignore_spaces` and `has_token_after_spaces` are never used [INFO] [stdout] --> src/parser.rs:79:8 [INFO] [stdout] | [INFO] [stdout] 41 | impl Parser [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 79 | fn get_token_ignore_spaces(&self) -> Option<&Token> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 97 | fn has_token_after_spaces(&self) -> bool [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `trace_back` is never read [INFO] [stdout] --> src/error.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Error [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 7 | trace_back: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `redefine_error` is never used [INFO] [stdout] --> src/error.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Error { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 57 | pub fn redefine_error(desc: &str, x: i32, y: i32) -> Error [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `is_data_type` and `is_keyword` are never read [INFO] [stdout] --> src/lexer.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Token { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | pub is_data_type: bool, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 11 | pub is_keyword: bool [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Token` 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: methods `set_origin` and `to_string` are never used [INFO] [stdout] --> src/lexer.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Token { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn set_origin(&mut self, x: i32, y :i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn to_string(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `log` is never read [INFO] [stdout] --> src/lexer.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 72 | pub struct TokensWithLogAndError [INFO] [stdout] | --------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 75 | pub log: Vec, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokensWithLogAndError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `is_const` is never read [INFO] [stdout] --> src/data_types.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct VariableSingleValued [INFO] [stdout] | -------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 9 | pub is_const: bool, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `VariableSingleValued` 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: struct `Arguments` is never constructed [INFO] [stdout] --> src/data_types.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct Arguments [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Function` is never constructed [INFO] [stdout] --> src/data_types.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct Function [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pass` is never used [INFO] [stdout] --> src/parser.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn pass() [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_token_ignore_spaces` and `has_token_after_spaces` are never used [INFO] [stdout] --> src/parser.rs:79:8 [INFO] [stdout] | [INFO] [stdout] 41 | impl Parser [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 79 | fn get_token_ignore_spaces(&self) -> Option<&Token> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 97 | fn has_token_after_spaces(&self) -> bool [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `trace_back` is never read [INFO] [stdout] --> src/error.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Error [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 7 | trace_back: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Error` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `redefine_error` is never used [INFO] [stdout] --> src/error.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl Error { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 57 | pub fn redefine_error(desc: &str, x: i32, y: i32) -> Error [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `is_data_type` and `is_keyword` are never read [INFO] [stdout] --> src/lexer.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Token { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | pub is_data_type: bool, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 11 | pub is_keyword: bool [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Token` 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: methods `set_origin` and `to_string` are never used [INFO] [stdout] --> src/lexer.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Token { [INFO] [stdout] | ---------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 41 | pub fn set_origin(&mut self, x: i32, y :i32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | pub fn to_string(&self) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `log` is never read [INFO] [stdout] --> src/lexer.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 72 | pub struct TokensWithLogAndError [INFO] [stdout] | --------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 75 | pub log: Vec, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TokensWithLogAndError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `is_const` is never read [INFO] [stdout] --> src/data_types.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct VariableSingleValued [INFO] [stdout] | -------------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 9 | pub is_const: bool, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `VariableSingleValued` 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: struct `Arguments` is never constructed [INFO] [stdout] --> src/data_types.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub struct Arguments [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Function` is never constructed [INFO] [stdout] --> src/data_types.rs:22:12 [INFO] [stdout] | [INFO] [stdout] 22 | pub struct Function [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/compiler.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | val = (&val[(0 as usize)..(val.len() - 1 as usize)]).to_string() + ")"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `val[(0 as usize)..(val.len() - 1 as usize)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/compiler.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | val = (&val[(0 as usize)..(val.len() - 1 as usize)]).to_string() + ")"; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/compiler.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | val = (&val[(0 as usize)..(val.len() - 1 as usize)]).to_string() + ")"; [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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/parser.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | let ss = (&str[(start as usize)..(end as usize)]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `str[(start as usize)..(end as usize)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constructor `parser` has the same name as the type [INFO] [stdout] --> src/parser.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn parser() -> Parser [INFO] [stdout] 44 | | { [INFO] [stdout] 45 | | Parser [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors [INFO] [stdout] = note: `#[warn(clippy::self_named_constructors)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:235:28 [INFO] [stdout] | [INFO] [stdout] 235 | if !eval.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `eval.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 `eval` after checking its variant with `is_none` [INFO] [stdout] --> src/parser.rs:236:63 [INFO] [stdout] | [INFO] [stdout] 235 | if !eval.is_none(){ [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 236 | self.yal.push(YAL::Py(Py { value: eval.unwrap().to_string() })); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/compiler.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | val = (&val[(0 as usize)..(val.len() - 1 as usize)]).to_string() + ")"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `val[(0 as usize)..(val.len() - 1 as usize)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/compiler.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | val = (&val[(0 as usize)..(val.len() - 1 as usize)]).to_string() + ")"; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `0_usize` [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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/compiler.rs:21:44 [INFO] [stdout] | [INFO] [stdout] 21 | val = (&val[(0 as usize)..(val.len() - 1 as usize)]).to_string() + ")"; [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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/parser.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | let ss = (&str[(start as usize)..(end as usize)]).to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `str[(start as usize)..(end as usize)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/parser.rs:281:37 [INFO] [stdout] | [INFO] [stdout] 281 | ... assert!(false, "huh?") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constructor `parser` has the same name as the type [INFO] [stdout] --> src/parser.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub fn parser() -> Parser [INFO] [stdout] 44 | | { [INFO] [stdout] 45 | | Parser [INFO] [stdout] ... | [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors [INFO] [stdout] = note: `#[warn(clippy::self_named_constructors)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `lexer::Token` [INFO] [stdout] --> src/lexer.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn to_string(&self) -> String { [INFO] [stdout] 50 | | format!("Token {} '{}' at char {}, line {}", self.token_type, self.value, self.x, self.y) [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `lexer::Token` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constructor `lexer` has the same name as the type [INFO] [stdout] --> src/lexer.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / pub fn lexer() -> Lexer { [INFO] [stdout] 82 | | let mut lexer = Lexer{defined_tokens: HashMap::new(), text_to_lex: [].to_vec(), index: -1, run: true, [INFO] [stdout] 83 | | current_char: ' ', x: 0, y: 1, the_nums: vec!['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], [INFO] [stdout] 84 | | log: Vec::new(), error: Vec::new(), tok_start_x: 0, [INFO] [stdout] ... | [INFO] [stdout] 120 | | lexer [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parser.rs:235:28 [INFO] [stdout] | [INFO] [stdout] 235 | if !eval.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `eval.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 `eval` after checking its variant with `is_none` [INFO] [stdout] --> src/parser.rs:236:63 [INFO] [stdout] | [INFO] [stdout] 235 | if !eval.is_none(){ [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 236 | self.yal.push(YAL::Py(Py { value: eval.unwrap().to_string() })); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `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: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lexer.rs:158:25 [INFO] [stdout] | [INFO] [stdout] 158 | token_type: String::from(format!("{}_keyword", value)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}_keyword", value)` [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: this assertion is always `false` [INFO] [stdout] --> src/parser.rs:281:37 [INFO] [stdout] | [INFO] [stdout] 281 | ... assert!(false, "huh?") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:248:25 [INFO] [stdout] | [INFO] [stdout] 248 | else if self.current_char == '"' && !comment_on || self.current_char == '\'' && !comment_on [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 248 - else if self.current_char == '"' && !comment_on || self.current_char == '\'' && !comment_on [INFO] [stdout] 248 + else if !(comment_on || self.current_char != '"' && self.current_char != '\'') [INFO] [stdout] | [INFO] [stdout] 248 - else if self.current_char == '"' && !comment_on || self.current_char == '\'' && !comment_on [INFO] [stdout] 248 + else if (self.current_char == '\'' || self.current_char == '"') && !comment_on [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `lexer::Token` [INFO] [stdout] --> src/lexer.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn to_string(&self) -> String { [INFO] [stdout] 50 | | format!("Token {} '{}' at char {}, line {}", self.token_type, self.value, self.x, self.y) [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `lexer::Token` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constructor `lexer` has the same name as the type [INFO] [stdout] --> src/lexer.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | / pub fn lexer() -> Lexer { [INFO] [stdout] 82 | | let mut lexer = Lexer{defined_tokens: HashMap::new(), text_to_lex: [].to_vec(), index: -1, run: true, [INFO] [stdout] 83 | | current_char: ' ', x: 0, y: 1, the_nums: vec!['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], [INFO] [stdout] 84 | | log: Vec::new(), error: Vec::new(), tok_start_x: 0, [INFO] [stdout] ... | [INFO] [stdout] 120 | | lexer [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `YAL` contains a capitalized acronym [INFO] [stdout] --> src/data_types.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | pub enum YAL [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Yal` [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: called `unwrap` on `file` after checking its variant with `is_ok` [INFO] [stdout] --> src/main.rs:24:20 [INFO] [stdout] | [INFO] [stdout] 22 | if file.is_ok() [INFO] [stdout] | --------------- help: try: `if let Ok() = file` [INFO] [stdout] 23 | { [INFO] [stdout] 24 | let read = file.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:110:21 [INFO] [stdout] | [INFO] [stdout] 110 | let types = vec!["var".to_string(), "int".to_string(), "str".to_string(), [INFO] [stdout] | _____________________^ [INFO] [stdout] 111 | | "float".to_string(), "bool".to_string(), "list".to_string(), [INFO] [stdout] 112 | | "vec".to_string(), "map".to_string()]; [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 110 ~ let types = ["var".to_string(), "int".to_string(), "str".to_string(), [INFO] [stdout] 111 + "float".to_string(), "bool".to_string(), "list".to_string(), [INFO] [stdout] 112 ~ "vec".to_string(), "map".to_string()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:113:19 [INFO] [stdout] | [INFO] [stdout] 113 | let ops = vec!["+".to_string(), "-".to_string(), "*".to_string(), "/".to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["+".to_string(), "-".to_string(), "*".to_string(), "/".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:114:37 [INFO] [stdout] | [INFO] [stdout] 114 | let sys_defined_functions = vec!["print"]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `["print"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:115:38 [INFO] [stdout] | [INFO] [stdout] 115 | let user_defined_functions = vec![""]; [INFO] [stdout] | ^^^^^^^^ help: you can use an array directly: `[""]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lexer.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | vec!["int".to_string(), "str".to_string(), "bool".to_string(), "float".to_string(), "list".to_string()].contains(&self.token... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["int".to_string(), "str".to_string(), "bool".to_string(), "float".to_string(), "list".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/lexer.rs:158:25 [INFO] [stdout] | [INFO] [stdout] 158 | token_type: String::from(format!("{}_keyword", value)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}_keyword", value)` [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: this boolean expression can be simplified [INFO] [stdout] --> src/lexer.rs:248:25 [INFO] [stdout] | [INFO] [stdout] 248 | else if self.current_char == '"' && !comment_on || self.current_char == '\'' && !comment_on [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 248 - else if self.current_char == '"' && !comment_on || self.current_char == '\'' && !comment_on [INFO] [stdout] 248 + else if !(comment_on || self.current_char != '"' && self.current_char != '\'') [INFO] [stdout] | [INFO] [stdout] 248 - else if self.current_char == '"' && !comment_on || self.current_char == '\'' && !comment_on [INFO] [stdout] 248 + else if (self.current_char == '\'' || self.current_char == '"') && !comment_on [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `YAL` contains a capitalized acronym [INFO] [stdout] --> src/data_types.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | pub enum YAL [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Yal` [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: called `unwrap` on `file` after checking its variant with `is_ok` [INFO] [stdout] --> src/main.rs:24:20 [INFO] [stdout] | [INFO] [stdout] 22 | if file.is_ok() [INFO] [stdout] | --------------- help: try: `if let Ok() = file` [INFO] [stdout] 23 | { [INFO] [stdout] 24 | let read = file.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:110:21 [INFO] [stdout] | [INFO] [stdout] 110 | let types = vec!["var".to_string(), "int".to_string(), "str".to_string(), [INFO] [stdout] | _____________________^ [INFO] [stdout] 111 | | "float".to_string(), "bool".to_string(), "list".to_string(), [INFO] [stdout] 112 | | "vec".to_string(), "map".to_string()]; [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 110 ~ let types = ["var".to_string(), "int".to_string(), "str".to_string(), [INFO] [stdout] 111 + "float".to_string(), "bool".to_string(), "list".to_string(), [INFO] [stdout] 112 ~ "vec".to_string(), "map".to_string()]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:113:19 [INFO] [stdout] | [INFO] [stdout] 113 | let ops = vec!["+".to_string(), "-".to_string(), "*".to_string(), "/".to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["+".to_string(), "-".to_string(), "*".to_string(), "/".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:114:37 [INFO] [stdout] | [INFO] [stdout] 114 | let sys_defined_functions = vec!["print"]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `["print"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/parser.rs:115:38 [INFO] [stdout] | [INFO] [stdout] 115 | let user_defined_functions = vec![""]; [INFO] [stdout] | ^^^^^^^^ help: you can use an array directly: `[""]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/lexer.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | vec!["int".to_string(), "str".to_string(), "bool".to_string(), "float".to_string(), "list".to_string()].contains(&self.token... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["int".to_string(), "str".to_string(), "bool".to_string(), "float".to_string(), "list".to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.63s [INFO] running `Command { std: "docker" "inspect" "95d95abc52bee9ca2e87f69f2f769d7035257757a0ed364ffac8b5b6550e69bf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "95d95abc52bee9ca2e87f69f2f769d7035257757a0ed364ffac8b5b6550e69bf", kill_on_drop: false }` [INFO] [stdout] 95d95abc52bee9ca2e87f69f2f769d7035257757a0ed364ffac8b5b6550e69bf