[INFO] cloning repository https://github.com/bnjbvr/bad-wasm-interp [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bnjbvr/bad-wasm-interp" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbnjbvr%2Fbad-wasm-interp", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbnjbvr%2Fbad-wasm-interp'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ba6f41cab2027ad00892e5e44eda7f304cd770f7 [INFO] linting bnjbvr/bad-wasm-interp against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbnjbvr%2Fbad-wasm-interp" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/bnjbvr/bad-wasm-interp [INFO] finished tweaking git repo https://github.com/bnjbvr/bad-wasm-interp [INFO] tweaked toml for git repo https://github.com/bnjbvr/bad-wasm-interp written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/bnjbvr/bad-wasm-interp 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/bnjbvr/bad-wasm-interp 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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] a5e8287f240d621d6990495896cf58c6dfe848babbc312888f53d3450023df20 [INFO] running `Command { std: "docker" "start" "-a" "a5e8287f240d621d6990495896cf58c6dfe848babbc312888f53d3450023df20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a5e8287f240d621d6990495896cf58c6dfe848babbc312888f53d3450023df20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a5e8287f240d621d6990495896cf58c6dfe848babbc312888f53d3450023df20", kill_on_drop: false }` [INFO] [stdout] a5e8287f240d621d6990495896cf58c6dfe848babbc312888f53d3450023df20 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] cb1c08f2e5b4d28f802389568f898ba048130ba62b723ada5bf9a93ba1b81b0d [INFO] running `Command { std: "docker" "start" "-a" "cb1c08f2e5b4d28f802389568f898ba048130ba62b723ada5bf9a93ba1b81b0d", kill_on_drop: false }` [INFO] [stderr] Checking toy-wasm v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `size` [INFO] [stdout] --> src/main.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | let size = self.read_var_u32(cur); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_size` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | for i in 0..num_args { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `valtype_code` [INFO] [stdout] --> src/main.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | let valtype_code = self.binary[*cur]; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_valtype_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 0..num_rets { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `valtype_code` [INFO] [stdout] --> src/main.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | let valtype_code = self.binary[*cur]; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_valtype_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | for i in 0..num_decls { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | for i in 0..num_exports { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:152:54 [INFO] [stdout] | [INFO] [stdout] 152 | fn decode_func_body(&self, must_interpret: bool, mut cur: &mut usize) -> Option { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | for i in 0..num_local_groups { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `group_count` [INFO] [stdout] --> src/main.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | let group_count = self.read_var_u32(cur); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_group_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | if self.binary[*cur + 4] != 1 [INFO] [stdout] | ____________^ [INFO] [stdout] 28 | | || self.binary[*cur + 5] != 0 [INFO] [stdout] 29 | | || self.binary[*cur + 6] != 0 [INFO] [stdout] 30 | | || self.binary[*cur + 6] != 0 [INFO] [stdout] | |_________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 - if self.binary[*cur + 4] != 1 [INFO] [stdout] 28 - || self.binary[*cur + 5] != 0 [INFO] [stdout] 29 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 30 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 27 + if !(self.binary[*cur + 4] == 1 && self.binary[*cur + 5] == 0 && self.binary[*cur + 6] == 0) [INFO] [stdout] | [INFO] [stdout] 27 - if self.binary[*cur + 4] != 1 [INFO] [stdout] 28 - || self.binary[*cur + 5] != 0 [INFO] [stdout] 29 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 30 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 27 + if self.binary[*cur + 4] != 1 || self.binary[*cur + 5] != 0 || self.binary[*cur + 6] != 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return result; [INFO] [stdout] 63 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/main.rs:52:23 [INFO] [stdout] | [INFO] [stdout] 52 | result |= ((byte & 0x7F) as u32) << shift; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `((byte & 0x7F))` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 76 - return true; [INFO] [stdout] 76 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:98:38 [INFO] [stdout] | [INFO] [stdout] 98 | if !self.read_section_header(&mut cur, TYPE_SECTION_ID) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:102:43 [INFO] [stdout] | [INFO] [stdout] 102 | let num_types = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:107:47 [INFO] [stdout] | [INFO] [stdout] 107 | let type_code = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:111:30 [INFO] [stdout] | [INFO] [stdout] 111 | self.decode_func(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | self.read_section_header(&mut cur, 3); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:120:43 [INFO] [stdout] | [INFO] [stdout] 120 | let num_decls = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:122:53 [INFO] [stdout] | [INFO] [stdout] 122 | let func_type_index = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: usage of a legacy numeric method [INFO] [stdout] --> src/main.rs:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | return usize::max_value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 125 - return usize::max_value(); [INFO] [stdout] 125 + return usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:132:34 [INFO] [stdout] | [INFO] [stdout] 132 | self.read_section_header(&mut cur, 7); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:133:45 [INFO] [stdout] | [INFO] [stdout] 133 | let num_exports = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:136:47 [INFO] [stdout] | [INFO] [stdout] 136 | let num_bytes = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:140:49 [INFO] [stdout] | [INFO] [stdout] 140 | let export_kind = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:145:48 [INFO] [stdout] | [INFO] [stdout] 145 | let func_index = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:209:38 [INFO] [stdout] | [INFO] [stdout] 209 | if !self.read_section_header(&mut cur, 10) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:214:47 [INFO] [stdout] | [INFO] [stdout] 214 | let num_func_defs = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:219:13 [INFO] [stdout] | [INFO] [stdout] 219 | / match self.decode_func_body(must_interpret, &mut cur) { [INFO] [stdout] 220 | | Some(result) => match result { [INFO] [stdout] 221 | | EvalResult::I32(n) => println!("i32 result is {}", n), [INFO] [stdout] 222 | | }, [INFO] [stdout] 223 | | None => {} [INFO] [stdout] 224 | | } [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] 219 ~ if let Some(result) = self.decode_func_body(must_interpret, &mut cur) { match result { [INFO] [stdout] 220 + EvalResult::I32(n) => println!("i32 result is {}", n), [INFO] [stdout] 221 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:219:57 [INFO] [stdout] | [INFO] [stdout] 219 | match self.decode_func_body(must_interpret, &mut cur) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: panic message is not a string literal [INFO] [stdout] --> src/main.rs:199:35 [INFO] [stdout] | [INFO] [stdout] 199 | _ => unreachable!(format!("unknown opcode: {}", opcode)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `unreachable!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 199 - _ => unreachable!(format!("unknown opcode: {}", opcode)), [INFO] [stdout] 199 + _ => unreachable!("unknown opcode: {}", opcode), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | self.decode_code_section(func_index as u32, &mut cur); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 238 | let _ = self.decode_code_section(func_index as u32, &mut cur); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:252:5 [INFO] [stdout] | [INFO] [stdout] 252 | m.call_func(0); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 252 | let _ = m.call_func(0); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `size` [INFO] [stdout] --> src/main.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | let size = self.read_var_u32(cur); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_size` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:81:13 [INFO] [stdout] | [INFO] [stdout] 81 | for i in 0..num_args { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `valtype_code` [INFO] [stdout] --> src/main.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | let valtype_code = self.binary[*cur]; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_valtype_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:87:13 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 0..num_rets { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `valtype_code` [INFO] [stdout] --> src/main.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | let valtype_code = self.binary[*cur]; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_valtype_code` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | for i in 0..num_decls { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:134:13 [INFO] [stdout] | [INFO] [stdout] 134 | for i in 0..num_exports { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:152:54 [INFO] [stdout] | [INFO] [stdout] 152 | fn decode_func_body(&self, must_interpret: bool, mut cur: &mut usize) -> Option { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:161:13 [INFO] [stdout] | [INFO] [stdout] 161 | for i in 0..num_local_groups { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `group_count` [INFO] [stdout] --> src/main.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | let group_count = self.read_var_u32(cur); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_group_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | if self.binary[*cur + 4] != 1 [INFO] [stdout] | ____________^ [INFO] [stdout] 28 | | || self.binary[*cur + 5] != 0 [INFO] [stdout] 29 | | || self.binary[*cur + 6] != 0 [INFO] [stdout] 30 | | || self.binary[*cur + 6] != 0 [INFO] [stdout] | |_________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 27 - if self.binary[*cur + 4] != 1 [INFO] [stdout] 28 - || self.binary[*cur + 5] != 0 [INFO] [stdout] 29 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 30 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 27 + if !(self.binary[*cur + 4] == 1 && self.binary[*cur + 5] == 0 && self.binary[*cur + 6] == 0) [INFO] [stdout] | [INFO] [stdout] 27 - if self.binary[*cur + 4] != 1 [INFO] [stdout] 28 - || self.binary[*cur + 5] != 0 [INFO] [stdout] 29 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 30 - || self.binary[*cur + 6] != 0 [INFO] [stdout] 27 + if self.binary[*cur + 4] != 1 || self.binary[*cur + 5] != 0 || self.binary[*cur + 6] != 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | return result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 63 - return result; [INFO] [stdout] 63 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/main.rs:52:23 [INFO] [stdout] | [INFO] [stdout] 52 | result |= ((byte & 0x7F) as u32) << shift; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `((byte & 0x7F))` [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: unneeded `return` statement [INFO] [stdout] --> src/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 76 - return true; [INFO] [stdout] 76 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:98:38 [INFO] [stdout] | [INFO] [stdout] 98 | if !self.read_section_header(&mut cur, TYPE_SECTION_ID) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:102:43 [INFO] [stdout] | [INFO] [stdout] 102 | let num_types = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:107:47 [INFO] [stdout] | [INFO] [stdout] 107 | let type_code = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:111:30 [INFO] [stdout] | [INFO] [stdout] 111 | self.decode_func(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | self.read_section_header(&mut cur, 3); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:120:43 [INFO] [stdout] | [INFO] [stdout] 120 | let num_decls = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:122:53 [INFO] [stdout] | [INFO] [stdout] 122 | let func_type_index = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: usage of a legacy numeric method [INFO] [stdout] --> src/main.rs:125:24 [INFO] [stdout] | [INFO] [stdout] 125 | return usize::max_value(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 125 - return usize::max_value(); [INFO] [stdout] 125 + return usize::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:132:34 [INFO] [stdout] | [INFO] [stdout] 132 | self.read_section_header(&mut cur, 7); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:133:45 [INFO] [stdout] | [INFO] [stdout] 133 | let num_exports = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:136:47 [INFO] [stdout] | [INFO] [stdout] 136 | let num_bytes = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:140:49 [INFO] [stdout] | [INFO] [stdout] 140 | let export_kind = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:145:48 [INFO] [stdout] | [INFO] [stdout] 145 | let func_index = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:209:38 [INFO] [stdout] | [INFO] [stdout] 209 | if !self.read_section_header(&mut cur, 10) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:214:47 [INFO] [stdout] | [INFO] [stdout] 214 | let num_func_defs = self.read_var_u32(&mut cur); [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/main.rs:219:13 [INFO] [stdout] | [INFO] [stdout] 219 | / match self.decode_func_body(must_interpret, &mut cur) { [INFO] [stdout] 220 | | Some(result) => match result { [INFO] [stdout] 221 | | EvalResult::I32(n) => println!("i32 result is {}", n), [INFO] [stdout] 222 | | }, [INFO] [stdout] 223 | | None => {} [INFO] [stdout] 224 | | } [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] 219 ~ if let Some(result) = self.decode_func_body(must_interpret, &mut cur) { match result { [INFO] [stdout] 220 + EvalResult::I32(n) => println!("i32 result is {}", n), [INFO] [stdout] 221 + } } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:219:57 [INFO] [stdout] | [INFO] [stdout] 219 | match self.decode_func_body(must_interpret, &mut cur) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `cur` [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: panic message is not a string literal [INFO] [stdout] --> src/main.rs:199:35 [INFO] [stdout] | [INFO] [stdout] 199 | _ => unreachable!(format!("unknown opcode: {}", opcode)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this usage of `unreachable!()` is deprecated; it will be a hard error in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: the `unreachable!()` macro supports formatting, so there's no need for the `format!()` macro here [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default [INFO] [stdout] help: remove the `format!(..)` macro call [INFO] [stdout] | [INFO] [stdout] 199 - _ => unreachable!(format!("unknown opcode: {}", opcode)), [INFO] [stdout] 199 + _ => unreachable!("unknown opcode: {}", opcode), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | self.decode_code_section(func_index as u32, &mut cur); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 238 | let _ = self.decode_code_section(func_index as u32, &mut cur); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:252:5 [INFO] [stdout] | [INFO] [stdout] 252 | m.call_func(0); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 252 | let _ = m.call_func(0); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s [INFO] running `Command { std: "docker" "inspect" "cb1c08f2e5b4d28f802389568f898ba048130ba62b723ada5bf9a93ba1b81b0d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cb1c08f2e5b4d28f802389568f898ba048130ba62b723ada5bf9a93ba1b81b0d", kill_on_drop: false }` [INFO] [stdout] cb1c08f2e5b4d28f802389568f898ba048130ba62b723ada5bf9a93ba1b81b0d