[INFO] cloning repository https://github.com/ParkerTenBroeck/dyn_link [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ParkerTenBroeck/dyn_link" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FParkerTenBroeck%2Fdyn_link", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FParkerTenBroeck%2Fdyn_link'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6f20085fc663e8f6d12f728711486e2af281383f [INFO] linting ParkerTenBroeck/dyn_link against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FParkerTenBroeck%2Fdyn_link" "/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/ParkerTenBroeck/dyn_link [INFO] finished tweaking git repo https://github.com/ParkerTenBroeck/dyn_link [INFO] tweaked toml for git repo https://github.com/ParkerTenBroeck/dyn_link written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ParkerTenBroeck/dyn_link 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/ParkerTenBroeck/dyn_link 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] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tempdir v0.3.7 [INFO] [stderr] Downloaded mmap v0.1.1 [INFO] [stderr] Downloaded anstream v0.6.5 [INFO] [stderr] Downloaded clap v4.4.11 [INFO] [stderr] Downloaded clap_builder v4.4.11 [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] 398499c0ed815085140567633122f01f0bd0fe21ab2dc43de22ad8185a043c1c [INFO] running `Command { std: "docker" "start" "-a" "398499c0ed815085140567633122f01f0bd0fe21ab2dc43de22ad8185a043c1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "398499c0ed815085140567633122f01f0bd0fe21ab2dc43de22ad8185a043c1c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "398499c0ed815085140567633122f01f0bd0fe21ab2dc43de22ad8185a043c1c", kill_on_drop: false }` [INFO] [stdout] 398499c0ed815085140567633122f01f0bd0fe21ab2dc43de22ad8185a043c1c [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] 49f383bf8393ed37067428e861793d12dccb203d3657efcf153dd265ab78eb38 [INFO] running `Command { std: "docker" "start" "-a" "49f383bf8393ed37067428e861793d12dccb203d3657efcf153dd265ab78eb38", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.70 [INFO] [stderr] Checking utf8parse v0.2.1 [INFO] [stderr] Checking anstyle-query v1.0.2 [INFO] [stderr] Checking colorchoice v1.0.0 [INFO] [stderr] Checking anstyle v1.0.4 [INFO] [stderr] Checking clap_lex v0.6.0 [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Checking remove_dir_all v0.5.3 [INFO] [stderr] Checking libc v0.1.12 [INFO] [stderr] Checking anstyle-parse v0.2.3 [INFO] [stderr] Checking anstream v0.6.5 [INFO] [stderr] Checking clap_builder v4.4.11 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Checking tempdir v0.3.7 [INFO] [stderr] Compiling syn v2.0.41 [INFO] [stderr] Checking mmap v0.1.1 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking clap v4.4.11 [INFO] [stderr] Checking jit v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Stdin` [INFO] [stdout] --> src/brain/codegen/llvm.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | io::{Stdin, Write}, [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: `Stdin` [INFO] [stdout] --> src/brain/codegen/llvm.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | io::{Stdin, Write}, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `additional` is never read [INFO] [stdout] --> src/brain/codegen/llvm.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Llvm { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 12 | additional: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `parse` is never used [INFO] [stdout] --> src/brain/parse.rs:95:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl<'a> BfParser<'a> { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn parse(&mut self) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:145:32 [INFO] [stdout] | [INFO] [stdout] 145 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:163:36 [INFO] [stdout] | [INFO] [stdout] 163 | out.write_all(&(*byte_off as i32).to_le_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:175:36 [INFO] [stdout] | [INFO] [stdout] 175 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:186:36 [INFO] [stdout] | [INFO] [stdout] 186 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:195:36 [INFO] [stdout] | [INFO] [stdout] 195 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:204:36 [INFO] [stdout] | [INFO] [stdout] 204 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:216:36 [INFO] [stdout] | [INFO] [stdout] 216 | out.write_all(&(*byte_off as i32).to_le_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:227:36 [INFO] [stdout] | [INFO] [stdout] 227 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:265:36 [INFO] [stdout] | [INFO] [stdout] 265 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`u8` -> `u8`) [INFO] [stdout] --> src/brain/codegen/custom.rs:274:66 [INFO] [stdout] | [INFO] [stdout] 274 | out.write_all(&[0xc6, 0x43, *byte_off as u8, *val as u8]) [INFO] [stdout] | ^^^^^^^^^^ help: try: `(*val)` [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 (`u8` -> `u8`) [INFO] [stdout] --> src/brain/codegen/custom.rs:278:37 [INFO] [stdout] | [INFO] [stdout] 278 | out.write_all(&[*val as u8]) [INFO] [stdout] | ^^^^^^^^^^ help: try: `(*val)` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/brain/codegen/custom.rs:451:29 [INFO] [stdout] | [INFO] [stdout] 451 | for _ in 0..((size + 7) / 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/brain/codegen/custom.rs:484:17 [INFO] [stdout] | [INFO] [stdout] 484 | / match self.stack { [INFO] [stdout] 485 | | StackKind::CreateN(mut size) => { [INFO] [stdout] 486 | | size = ((size + 7) / 8) * 8; [INFO] [stdout] 487 | | loop { [INFO] [stdout] ... | [INFO] [stdout] 497 | | _ => {} [INFO] [stdout] 498 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 484 ~ if let StackKind::CreateN(mut size) = self.stack { [INFO] [stdout] 485 + size = ((size + 7) / 8) * 8; [INFO] [stdout] 486 + loop { [INFO] [stdout] 487 + if size > i32::MAX as u64 { [INFO] [stdout] 488 + self.push_instrucion(Instruction::AddImmRsp(i32::MAX)); [INFO] [stdout] 489 + size -= i32::MAX as u64; [INFO] [stdout] 490 + } else { [INFO] [stdout] 491 + self.push_instrucion(Instruction::AddImmRsp(size as i32)); [INFO] [stdout] 492 + break; [INFO] [stdout] 493 + } [INFO] [stdout] 494 + } [INFO] [stdout] 495 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/brain/codegen/custom.rs:486:32 [INFO] [stdout] | [INFO] [stdout] 486 | size = ((size + 7) / 8) * 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/brain/codegen/custom.rs:665:19 [INFO] [stdout] | [INFO] [stdout] 665 | fn repr_bytes<'a>(&'a self) -> &'a [u8] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 665 - fn repr_bytes<'a>(&'a self) -> &'a [u8] { [INFO] [stdout] 665 + fn repr_bytes(&self) -> &[u8] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/brain/codegen/custom.rs:833:9 [INFO] [stdout] | [INFO] [stdout] 833 | ((program_start_unaligned as u64 + PROGRAM_ALIGN - 1) / PROGRAM_ALIGN) * PROGRAM_ALIGN; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(program_start_unaligned as u64).div_ceil(PROGRAM_ALIGN)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain/codegen/custom.rs:942:20 [INFO] [stdout] | [INFO] [stdout] 942 | file.write_all(&instructions) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `instructions` [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: useless use of `format!` [INFO] [stdout] --> src/brain/codegen/llvm.rs:67:28 [INFO] [stdout] | [INFO] [stdout] 67 | let off_ptr_type = format!("ptr noalias nocapture noundef nonnull align 8"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"ptr noalias nocapture noundef nonnull align 8".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: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/brain/interpret.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | some as u8 [INFO] [stdout] | ^^^^^^^^^^ help: try: `some` [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 implementation of an assign operation [INFO] [stdout] --> src/brain/interpret.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | self.position = self.position + ptr_off; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.position += ptr_off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/brain/interpret.rs:56:30 [INFO] [stdout] | [INFO] [stdout] 56 | print!("{}", self.data[position] as u8 as char); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data[position]` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/brain/parse.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | while let Some(char) = self.chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for char in self.chars.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain/stages/stage2.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | ast_to_ir(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/brain/codegen/custom.rs:322:9 [INFO] [stdout] | [INFO] [stdout] 318 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 322 | print: extern "C" fn(&u8), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/brain/codegen/custom.rs:323:9 [INFO] [stdout] | [INFO] [stdout] 318 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 323 | read: extern "C" fn(&mut u8), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `additional` is never read [INFO] [stdout] --> src/brain/codegen/llvm.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct Llvm { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 12 | additional: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `parse` is never used [INFO] [stdout] --> src/brain/parse.rs:95:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl<'a> BfParser<'a> { [INFO] [stdout] | --------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 95 | pub fn parse(&mut self) -> Vec { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:145:32 [INFO] [stdout] | [INFO] [stdout] 145 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:163:36 [INFO] [stdout] | [INFO] [stdout] 163 | out.write_all(&(*byte_off as i32).to_le_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:175:36 [INFO] [stdout] | [INFO] [stdout] 175 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:186:36 [INFO] [stdout] | [INFO] [stdout] 186 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:195:36 [INFO] [stdout] | [INFO] [stdout] 195 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:204:36 [INFO] [stdout] | [INFO] [stdout] 204 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:216:36 [INFO] [stdout] | [INFO] [stdout] 216 | out.write_all(&(*byte_off as i32).to_le_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:227:36 [INFO] [stdout] | [INFO] [stdout] 227 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`i32` -> `i32`) [INFO] [stdout] --> src/brain/codegen/custom.rs:265:36 [INFO] [stdout] | [INFO] [stdout] 265 | out.write_all(&(*byte_off as i32).to_le_bytes()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `(*byte_off)` [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 (`u8` -> `u8`) [INFO] [stdout] --> src/brain/codegen/custom.rs:274:66 [INFO] [stdout] | [INFO] [stdout] 274 | out.write_all(&[0xc6, 0x43, *byte_off as u8, *val as u8]) [INFO] [stdout] | ^^^^^^^^^^ help: try: `(*val)` [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 (`u8` -> `u8`) [INFO] [stdout] --> src/brain/codegen/custom.rs:278:37 [INFO] [stdout] | [INFO] [stdout] 278 | out.write_all(&[*val as u8]) [INFO] [stdout] | ^^^^^^^^^^ help: try: `(*val)` [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: manually reimplementing `div_ceil` [INFO] [stdout] --> src/brain/codegen/custom.rs:451:29 [INFO] [stdout] | [INFO] [stdout] 451 | for _ in 0..((size + 7) / 8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/brain/codegen/custom.rs:484:17 [INFO] [stdout] | [INFO] [stdout] 484 | / match self.stack { [INFO] [stdout] 485 | | StackKind::CreateN(mut size) => { [INFO] [stdout] 486 | | size = ((size + 7) / 8) * 8; [INFO] [stdout] 487 | | loop { [INFO] [stdout] ... | [INFO] [stdout] 497 | | _ => {} [INFO] [stdout] 498 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 484 ~ if let StackKind::CreateN(mut size) = self.stack { [INFO] [stdout] 485 + size = ((size + 7) / 8) * 8; [INFO] [stdout] 486 + loop { [INFO] [stdout] 487 + if size > i32::MAX as u64 { [INFO] [stdout] 488 + self.push_instrucion(Instruction::AddImmRsp(i32::MAX)); [INFO] [stdout] 489 + size -= i32::MAX as u64; [INFO] [stdout] 490 + } else { [INFO] [stdout] 491 + self.push_instrucion(Instruction::AddImmRsp(size as i32)); [INFO] [stdout] 492 + break; [INFO] [stdout] 493 + } [INFO] [stdout] 494 + } [INFO] [stdout] 495 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/brain/codegen/custom.rs:486:32 [INFO] [stdout] | [INFO] [stdout] 486 | size = ((size + 7) / 8) * 8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/brain/codegen/custom.rs:665:19 [INFO] [stdout] | [INFO] [stdout] 665 | fn repr_bytes<'a>(&'a self) -> &'a [u8] { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 665 - fn repr_bytes<'a>(&'a self) -> &'a [u8] { [INFO] [stdout] 665 + fn repr_bytes(&self) -> &[u8] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/brain/codegen/custom.rs:833:9 [INFO] [stdout] | [INFO] [stdout] 833 | ((program_start_unaligned as u64 + PROGRAM_ALIGN - 1) / PROGRAM_ALIGN) * PROGRAM_ALIGN; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(program_start_unaligned as u64).div_ceil(PROGRAM_ALIGN)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain/codegen/custom.rs:942:20 [INFO] [stdout] | [INFO] [stdout] 942 | file.write_all(&instructions) [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `instructions` [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: useless use of `format!` [INFO] [stdout] --> src/brain/codegen/llvm.rs:67:28 [INFO] [stdout] | [INFO] [stdout] 67 | let off_ptr_type = format!("ptr noalias nocapture noundef nonnull align 8"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"ptr noalias nocapture noundef nonnull align 8".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: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/brain/interpret.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | some as u8 [INFO] [stdout] | ^^^^^^^^^^ help: try: `some` [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 implementation of an assign operation [INFO] [stdout] --> src/brain/interpret.rs:52:17 [INFO] [stdout] | [INFO] [stdout] 52 | self.position = self.position + ptr_off; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.position += ptr_off` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u8` -> `u8`) [INFO] [stdout] --> src/brain/interpret.rs:56:30 [INFO] [stdout] | [INFO] [stdout] 56 | print!("{}", self.data[position] as u8 as char); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data[position]` [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 loop could be written as a `for` loop [INFO] [stdout] --> src/brain/parse.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | while let Some(char) = self.chars.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for char in self.chars.by_ref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stdout] = note: `#[warn(clippy::while_let_on_iterator)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain/stages/stage2.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | ast_to_ir(&input) [INFO] [stdout] | ^^^^^^ help: change this to: `input` [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: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/brain/codegen/custom.rs:322:9 [INFO] [stdout] | [INFO] [stdout] 318 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 322 | print: extern "C" fn(&u8), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/brain/codegen/custom.rs:323:9 [INFO] [stdout] | [INFO] [stdout] 318 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 323 | read: extern "C" fn(&mut u8), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.60s [INFO] running `Command { std: "docker" "inspect" "49f383bf8393ed37067428e861793d12dccb203d3657efcf153dd265ab78eb38", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "49f383bf8393ed37067428e861793d12dccb203d3657efcf153dd265ab78eb38", kill_on_drop: false }` [INFO] [stdout] 49f383bf8393ed37067428e861793d12dccb203d3657efcf153dd265ab78eb38