[INFO] cloning repository https://github.com/1971cmd/c4_rust_alwathba [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/1971cmd/c4_rust_alwathba" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1971cmd%2Fc4_rust_alwathba", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1971cmd%2Fc4_rust_alwathba'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4e6bc804cab7f6e3dacf61a3b9a487f19c5bbdac [INFO] linting 1971cmd/c4_rust_alwathba against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1971cmd%2Fc4_rust_alwathba" "/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/1971cmd/c4_rust_alwathba [INFO] finished tweaking git repo https://github.com/1971cmd/c4_rust_alwathba [INFO] tweaked toml for git repo https://github.com/1971cmd/c4_rust_alwathba written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/1971cmd/c4_rust_alwathba 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/1971cmd/c4_rust_alwathba 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] 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] dac4bb7620595e30cd99b01955d1478e9a8a185eb8145ca6948c336aa6eb1ff1 [INFO] running `Command { std: "docker" "start" "-a" "dac4bb7620595e30cd99b01955d1478e9a8a185eb8145ca6948c336aa6eb1ff1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dac4bb7620595e30cd99b01955d1478e9a8a185eb8145ca6948c336aa6eb1ff1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dac4bb7620595e30cd99b01955d1478e9a8a185eb8145ca6948c336aa6eb1ff1", kill_on_drop: false }` [INFO] [stdout] dac4bb7620595e30cd99b01955d1478e9a8a185eb8145ca6948c336aa6eb1ff1 [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] 41397a063b5ee85b94ded099ba07e31cbb40d12b19757acc099d4e625b21678f [INFO] running `Command { std: "docker" "start" "-a" "41397a063b5ee85b94ded099ba07e31cbb40d12b19757acc099d4e625b21678f", kill_on_drop: false }` [INFO] [stderr] Checking lab v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Lexer` [INFO] [stdout] --> src/vm.rs:423:21 [INFO] [stdout] | [INFO] [stdout] 423 | use crate::c4::{Lexer, Parser}; [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 variable: `parent_env` [INFO] [stdout] --> src/vm.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let parent_env = self.env_stack.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parent_env` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env` [INFO] [stdout] --> src/vm.rs:228:47 [INFO] [stdout] | [INFO] [stdout] 228 | Ok(Value::Function(_, env)) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_env` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `parent_env` [INFO] [stdout] --> src/vm.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let parent_env = self.env_stack.last().unwrap().clone(); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parent_env` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `env` [INFO] [stdout] --> src/vm.rs:228:47 [INFO] [stdout] | [INFO] [stdout] 228 | Ok(Value::Function(_, env)) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_env` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/c4.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | / pub fn next(&mut self) -> CompilerResult { [INFO] [stdout] 163 | | self.skip_whitespace(); [INFO] [stdout] 164 | | [INFO] [stdout] 165 | | match self.peek() { [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:216:24 [INFO] [stdout] | [INFO] [stdout] 216 | Some(c) if c.is_digit(10) => { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:221:32 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().is_some_and(|c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/c4.rs:221:62 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().map_or(false, |c| c.eq_ignore_ascii_case(&'x')) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/c4.rs:226:29 [INFO] [stdout] | [INFO] [stdout] 226 | if !c.is_digit(16) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:241:39 [INFO] [stdout] | [INFO] [stdout] 241 | } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 241 - } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] 241 + } else if c == '0' && self.peek().is_some_and(|c| c.is_digit(8)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:258:29 [INFO] [stdout] | [INFO] [stdout] 258 | if !c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/c4.rs:473:15 [INFO] [stdout] | [INFO] [stdout] 473 | while !matches!(self.current_token, Ok(Token::Eof)) && !(expect_closing_brace && self.is_op("}")) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(matches!(self.current_token, Ok(Token::Eof)) || expect_closing_brace && self.is_op("}"))` [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: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/c4.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | / pub fn next(&mut self) -> CompilerResult { [INFO] [stdout] 163 | | self.skip_whitespace(); [INFO] [stdout] 164 | | [INFO] [stdout] 165 | | match self.peek() { [INFO] [stdout] ... | [INFO] [stdout] 331 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:216:24 [INFO] [stdout] | [INFO] [stdout] 216 | Some(c) if c.is_digit(10) => { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:221:32 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().is_some_and(|c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/c4.rs:221:62 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().map_or(false, |c| c.eq_ignore_ascii_case(&'x')) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/c4.rs:226:29 [INFO] [stdout] | [INFO] [stdout] 226 | if !c.is_digit(16) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:241:39 [INFO] [stdout] | [INFO] [stdout] 241 | } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 241 - } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] 241 + } else if c == '0' && self.peek().is_some_and(|c| c.is_digit(8)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:258:29 [INFO] [stdout] | [INFO] [stdout] 258 | if !c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/c4.rs:473:15 [INFO] [stdout] | [INFO] [stdout] 473 | while !matches!(self.current_token, Ok(Token::Eof)) && !(expect_closing_brace && self.is_op("}")) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(matches!(self.current_token, Ok(Token::Eof)) || expect_closing_brace && self.is_op("}"))` [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: you should consider adding a `Default` implementation for `PrettyPrinter` [INFO] [stdout] --> src/utils.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | PrettyPrinter { indent: 0 } [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for PrettyPrinter { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/utils.rs:86:38 [INFO] [stdout] | [INFO] [stdout] 86 | result.push_str(&format!(" else {{\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" else {\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vm.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | builtins: HashMap) -> CompilerResult>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VM` [INFO] [stdout] --> src/vm.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn new() -> Self { [INFO] [stdout] 45 | | let mut vm = VM { [INFO] [stdout] 46 | | env_stack: vec![Rc::new(RefCell::new(HashMap::new()))], [INFO] [stdout] 47 | | builtins: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | vm [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 39 + impl Default for VM { [INFO] [stdout] 40 + fn default() -> Self { [INFO] [stdout] 41 + Self::new() [INFO] [stdout] 42 + } [INFO] [stdout] 43 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `PrettyPrinter` [INFO] [stdout] --> src/utils.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn new() -> Self { [INFO] [stdout] 25 | | PrettyPrinter { indent: 0 } [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for PrettyPrinter { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/utils.rs:86:38 [INFO] [stdout] | [INFO] [stdout] 86 | result.push_str(&format!(" else {{\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" else {\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/vm.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | builtins: HashMap) -> CompilerResult>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `VM` [INFO] [stdout] --> src/vm.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn new() -> Self { [INFO] [stdout] 45 | | let mut vm = VM { [INFO] [stdout] 46 | | env_stack: vec![Rc::new(RefCell::new(HashMap::new()))], [INFO] [stdout] 47 | | builtins: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 53 | | vm [INFO] [stdout] 54 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 39 + impl Default for VM { [INFO] [stdout] 40 + fn default() -> Self { [INFO] [stdout] 41 + Self::new() [INFO] [stdout] 42 + } [INFO] [stdout] 43 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Lexer` [INFO] [stdout] --> src/main.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | use c4::{Lexer, Parser}; [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: `Lexer` [INFO] [stdout] --> src/main.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | use c4::{Lexer, Parser}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:216:24 [INFO] [stdout] | [INFO] [stdout] 216 | Some(c) if c.is_digit(10) => { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:221:32 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().is_some_and(|c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/c4.rs:221:62 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().map_or(false, |c| c.eq_ignore_ascii_case(&'x')) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/c4.rs:226:29 [INFO] [stdout] | [INFO] [stdout] 226 | if !c.is_digit(16) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:241:39 [INFO] [stdout] | [INFO] [stdout] 241 | } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 241 - } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] 241 + } else if c == '0' && self.peek().is_some_and(|c| c.is_digit(8)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:258:29 [INFO] [stdout] | [INFO] [stdout] 258 | if !c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/c4.rs:473:15 [INFO] [stdout] | [INFO] [stdout] 473 | while !matches!(self.current_token, Ok(Token::Eof)) && !(expect_closing_brace && self.is_op("}")) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(matches!(self.current_token, Ok(Token::Eof)) || expect_closing_brace && self.is_op("}"))` [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: useless use of `format!` [INFO] [stdout] --> src/utils.rs:86:38 [INFO] [stdout] | [INFO] [stdout] 86 | result.push_str(&format!(" else {{\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" else {\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:216:24 [INFO] [stdout] | [INFO] [stdout] 216 | Some(c) if c.is_digit(10) => { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:221:32 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().is_some_and(|c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual case-insensitive ASCII comparison [INFO] [stdout] --> src/c4.rs:221:62 [INFO] [stdout] | [INFO] [stdout] 221 | if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp [INFO] [stdout] = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default [INFO] [stdout] help: consider using `.eq_ignore_ascii_case()` instead [INFO] [stdout] | [INFO] [stdout] 221 - if c == '0' && self.peek().map_or(false, |c| c.to_ascii_lowercase() == 'x') { [INFO] [stdout] 221 + if c == '0' && self.peek().map_or(false, |c| c.eq_ignore_ascii_case(&'x')) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/c4.rs:226:29 [INFO] [stdout] | [INFO] [stdout] 226 | if !c.is_digit(16) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/c4.rs:241:39 [INFO] [stdout] | [INFO] [stdout] 241 | } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 241 - } else if c == '0' && self.peek().map_or(false, |c| c.is_digit(8)) { [INFO] [stdout] 241 + } else if c == '0' && self.peek().is_some_and(|c| c.is_digit(8)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/c4.rs:258:29 [INFO] [stdout] | [INFO] [stdout] 258 | if !c.is_digit(10) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/c4.rs:473:15 [INFO] [stdout] | [INFO] [stdout] 473 | while !matches!(self.current_token, Ok(Token::Eof)) && !(expect_closing_brace && self.is_op("}")) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(matches!(self.current_token, Ok(Token::Eof)) || expect_closing_brace && self.is_op("}"))` [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: useless use of `format!` [INFO] [stdout] --> src/utils.rs:86:38 [INFO] [stdout] | [INFO] [stdout] 86 | result.push_str(&format!(" else {{\n")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `" else {\n".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.90s [INFO] running `Command { std: "docker" "inspect" "41397a063b5ee85b94ded099ba07e31cbb40d12b19757acc099d4e625b21678f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "41397a063b5ee85b94ded099ba07e31cbb40d12b19757acc099d4e625b21678f", kill_on_drop: false }` [INFO] [stdout] 41397a063b5ee85b94ded099ba07e31cbb40d12b19757acc099d4e625b21678f