[INFO] cloning repository https://github.com/iximeow/zvm [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/iximeow/zvm" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fiximeow%2Fzvm", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fiximeow%2Fzvm'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 1153ecd13c550f70de11b2d0995099e0f1906c2c [INFO] linting iximeow/zvm against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fiximeow%2Fzvm" "/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/iximeow/zvm [INFO] finished tweaking git repo https://github.com/iximeow/zvm [INFO] tweaked toml for git repo https://github.com/iximeow/zvm written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/iximeow/zvm 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/iximeow/zvm 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 signal-hook v0.1.17 [INFO] [stderr] Downloaded cranelift-frontend v0.86.1 [INFO] [stderr] Downloaded yaxpeax-arch v0.2.7 [INFO] [stderr] Downloaded crossterm_winapi v0.7.0 [INFO] [stderr] Downloaded cranelift-isle v0.86.1 [INFO] [stderr] Downloaded cranelift-codegen-shared v0.86.1 [INFO] [stderr] Downloaded cranelift-bforest v0.86.1 [INFO] [stderr] Downloaded cranelift-entity v0.86.1 [INFO] [stderr] Downloaded regalloc2 v0.3.1 [INFO] [stderr] Downloaded crossterm v0.19.0 [INFO] [stderr] Downloaded cranelift-codegen-meta v0.86.1 [INFO] [stderr] Downloaded cranelift-codegen v0.86.1 [INFO] [stderr] Downloaded yaxpeax-x86 v1.1.4 [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] 7a87caeebdebf45feab7e8cc1cabe158d00176398f9f8a121abd8d08190c217d [INFO] running `Command { std: "docker" "start" "-a" "7a87caeebdebf45feab7e8cc1cabe158d00176398f9f8a121abd8d08190c217d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7a87caeebdebf45feab7e8cc1cabe158d00176398f9f8a121abd8d08190c217d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7a87caeebdebf45feab7e8cc1cabe158d00176398f9f8a121abd8d08190c217d", kill_on_drop: false }` [INFO] [stdout] 7a87caeebdebf45feab7e8cc1cabe158d00176398f9f8a121abd8d08190c217d [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] 00622427def0115c81f87c054a1ee6d8bc1c266f2d4c7843c2ff06b78d5b10f0 [INFO] running `Command { std: "docker" "start" "-a" "00622427def0115c81f87c054a1ee6d8bc1c266f2d4c7843c2ff06b78d5b10f0", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.42 [INFO] [stderr] Compiling unicode-ident v1.0.2 [INFO] [stderr] Compiling byteorder v1.3.2 [INFO] [stderr] Compiling quote v1.0.20 [INFO] [stderr] Compiling cranelift-isle v0.86.1 [INFO] [stderr] Compiling indexmap v1.9.1 [INFO] [stderr] Compiling cranelift-codegen-shared v0.86.1 [INFO] [stderr] Compiling syn v1.0.98 [INFO] [stderr] Checking mio v0.7.14 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Compiling target-lexicon v0.12.4 [INFO] [stderr] Compiling serde_derive v1.0.140 [INFO] [stderr] Compiling serde v1.0.140 [INFO] [stderr] Checking parking_lot_core v0.8.5 [INFO] [stderr] Checking cranelift-entity v0.86.1 [INFO] [stderr] Compiling cranelift-codegen-meta v0.86.1 [INFO] [stderr] Checking slice-group-by v0.3.0 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Compiling yaxpeax-x86 v1.1.4 [INFO] [stderr] Checking signal-hook v0.1.17 [INFO] [stderr] Checking cranelift-bforest v0.86.1 [INFO] [stderr] Checking fxhash v0.2.1 [INFO] [stderr] Checking crossterm v0.19.0 [INFO] [stderr] Checking regalloc2 v0.3.1 [INFO] [stderr] Checking gimli v0.26.2 [INFO] [stderr] Compiling cranelift-codegen v0.86.1 [INFO] [stderr] Checking yaxpeax-arch v0.2.7 [INFO] [stderr] Checking cranelift-frontend v0.86.1 [INFO] [stderr] Checking zvm v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::cell::RefCell` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cell::RefCell; [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: `attribute::Attribute` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:7:38 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::class_file::unvalidated::{attribute::Attribute, AttributeInfo, MethodAccessFlags, MethodInfo}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValueRef` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:9:77 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::virtual_machine::{ClassFile, ClassFileRef, UnvalidatedClassFile, ValueRef}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `NativeObject` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:10:73 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::virtual_machine::{MethodBody, JvmArray, JvmObject, JvmValue, NativeObject}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | name_index: name_index, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `name_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::hash_map::Entry` [INFO] [stdout] --> src/virtual_machine.rs:3729:17 [INFO] [stdout] | [INFO] [stdout] 3729 | use std::collections::hash_map::Entry; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/mod.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SimpleJvmValue` [INFO] [stdout] --> src/compiler/mod.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::{SimpleJvmValue, VirtualMachine, VMState}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cell::RefCell` [INFO] [stdout] --> src/compiler/mod.rs:1113:5 [INFO] [stdout] | [INFO] [stdout] 1113 | use std::cell::RefCell; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/compiler/mod.rs:1151:5 [INFO] [stdout] | [INFO] [stdout] 1151 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cell::RefCell` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::cell::RefCell; [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: `attribute::Attribute` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:7:38 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::class_file::unvalidated::{attribute::Attribute, AttributeInfo, MethodAccessFlags, MethodInfo}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `ValueRef` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:9:77 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::virtual_machine::{ClassFile, ClassFileRef, UnvalidatedClassFile, ValueRef}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `NativeObject` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:10:73 [INFO] [stdout] | [INFO] [stdout] 10 | use crate::virtual_machine::{MethodBody, JvmArray, JvmObject, JvmValue, NativeObject}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:239:13 [INFO] [stdout] | [INFO] [stdout] 239 | name_index: name_index, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `name_index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::hash_map::Entry` [INFO] [stdout] --> src/virtual_machine.rs:3729:17 [INFO] [stdout] | [INFO] [stdout] 3729 | use std::collections::hash_map::Entry; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/compiler/mod.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `SimpleJvmValue` [INFO] [stdout] --> src/compiler/mod.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::{SimpleJvmValue, VirtualMachine, VMState}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cell::RefCell` [INFO] [stdout] --> src/compiler/mod.rs:1113:5 [INFO] [stdout] | [INFO] [stdout] 1113 | use std::cell::RefCell; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/compiler/mod.rs:1151:5 [INFO] [stdout] | [INFO] [stdout] 1151 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1353:9 [INFO] [stdout] | [INFO] [stdout] 1350 | panic!("todo: turn class name array into a real string"); [INFO] [stdout] | -------------------------------------------------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 1353 | / state.current_frame_mut() [INFO] [stdout] 1354 | | .operand_stack [INFO] [stdout] 1355 | | .push(ValueImpl::array_with_data( [INFO] [stdout] 1356 | | vm.resolve_class(class_name_string).expect("TODO: need to fish out the right string from `cls`."), [INFO] [stdout] 1357 | | elems.into_boxed_slice(), [INFO] [stdout] 1358 | | )); [INFO] [stdout] | |_______________^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1353:9 [INFO] [stdout] | [INFO] [stdout] 1350 | panic!("todo: turn class name array into a real string"); [INFO] [stdout] | -------------------------------------------------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 1353 | / state.current_frame_mut() [INFO] [stdout] 1354 | | .operand_stack [INFO] [stdout] 1355 | | .push(ValueImpl::array_with_data( [INFO] [stdout] 1356 | | vm.resolve_class(class_name_string).expect("TODO: need to fish out the right string from `cls`."), [INFO] [stdout] 1357 | | elems.into_boxed_slice(), [INFO] [stdout] 1358 | | )); [INFO] [stdout] | |_______________^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/virtual_machine.rs:2810:61 [INFO] [stdout] | [INFO] [stdout] 2810 | ...rap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^^^^^ ------------------------------- any code following this expression is unreachable [INFO] [stdout] | | [INFO] [stdout] | unreachable call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable call [INFO] [stdout] --> src/virtual_machine.rs:2810:61 [INFO] [stdout] | [INFO] [stdout] 2810 | ...rap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^^^^^ ------------------------------- any code following this expression is unreachable [INFO] [stdout] | | [INFO] [stdout] | unreachable call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/class_file/unvalidated/class.rs:183:13 [INFO] [stdout] | [INFO] [stdout] 183 | let mut attributes = Vec::new(); [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: variable does not need to be mutable [INFO] [stdout] --> src/class_file/unvalidated/class.rs:183:13 [INFO] [stdout] | [INFO] [stdout] 183 | let mut attributes = Vec::new(); [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: `bytecode` [INFO] [stdout] --> src/class_file/unvalidated/class.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | bytecode: Option>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_bytecode` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bytecode` [INFO] [stdout] --> src/class_file/unvalidated/class.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | bytecode: Option>, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_bytecode` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/class_file/unvalidated/class.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | mut self, [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/class_file/unvalidated/class.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | mut self, [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:195:20 [INFO] [stdout] | [INFO] [stdout] 195 | pub fn extends(mut self, name: &str) -> Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:195:20 [INFO] [stdout] | [INFO] [stdout] 195 | pub fn extends(mut self, name: &str) -> Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:203:24 [INFO] [stdout] | [INFO] [stdout] 203 | pub fn with_method(mut self, name: &str, sig: &str, native: Option>) -> Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:206:13 [INFO] [stdout] | [INFO] [stdout] 206 | let mut bytecode_methods = self.bytecode_methods; [INFO] [stdout] | ----^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:203:24 [INFO] [stdout] | [INFO] [stdout] 203 | pub fn with_method(mut self, name: &str, sig: &str, native: Option>) -> Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:206:13 [INFO] [stdout] | [INFO] [stdout] 206 | let mut bytecode_methods = self.bytecode_methods; [INFO] [stdout] | ----^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:252:23 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn with_field(mut self, name: &str, sig: &str) -> Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:271:13 [INFO] [stdout] | [INFO] [stdout] 271 | let mut cls = ClassFile::validate(&self.cls).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:252:23 [INFO] [stdout] | [INFO] [stdout] 252 | pub fn with_field(mut self, name: &str, sig: &str) -> Self { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:271:13 [INFO] [stdout] | [INFO] [stdout] 271 | let mut cls = ClassFile::validate(&self.cls).unwrap(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `obj` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:458:24 [INFO] [stdout] | [INFO] [stdout] 458 | } else if let Some(obj) = argument.as_object() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_obj` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `obj` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:458:24 [INFO] [stdout] | [INFO] [stdout] 458 | } else if let Some(obj) = argument.as_object() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_obj` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vm` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:626:71 [INFO] [stdout] | [INFO] [stdout] 626 | fn object_equals(state: &mut VMState, vm: &mut VirtualMachine) -> Result<(), VMError> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_vm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vm` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:626:71 [INFO] [stdout] | [INFO] [stdout] 626 | fn object_equals(state: &mut VMState, vm: &mut VirtualMachine) -> Result<(), VMError> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_vm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vm` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1323:72 [INFO] [stdout] | [INFO] [stdout] 1323 | fn array_newarray(state: &mut VMState, vm: &mut VirtualMachine) -> Result<(), VMError> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_vm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class_name_string` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1345:13 [INFO] [stdout] | [INFO] [stdout] 1345 | let class_name_string = { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_class_name_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vm` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1323:72 [INFO] [stdout] | [INFO] [stdout] 1323 | fn array_newarray(state: &mut VMState, vm: &mut VirtualMachine) -> Result<(), VMError> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_vm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class_name_string` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:1345:13 [INFO] [stdout] | [INFO] [stdout] 1345 | let class_name_string = { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_class_name_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vm` [INFO] [stdout] --> src/virtual_machine.rs:119:25 [INFO] [stdout] | [INFO] [stdout] 119 | fn abort(&mut self, vm: &mut VirtualMachine, message: String) -> ! { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_vm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vm` [INFO] [stdout] --> src/virtual_machine.rs:119:25 [INFO] [stdout] | [INFO] [stdout] 119 | fn abort(&mut self, vm: &mut VirtualMachine, message: String) -> ! { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_vm` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `frame` [INFO] [stdout] --> src/virtual_machine.rs:404:13 [INFO] [stdout] | [INFO] [stdout] 404 | let frame = self.current_frame(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `layout_id` [INFO] [stdout] --> src/virtual_machine.rs:2810:17 [INFO] [stdout] | [INFO] [stdout] 2810 | ... let layout_id = ZVM.as_ref().unwrap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_layout_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `frame` [INFO] [stdout] --> src/virtual_machine.rs:404:13 [INFO] [stdout] | [INFO] [stdout] 404 | let frame = self.current_frame(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_frame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class_file` [INFO] [stdout] --> src/virtual_machine.rs:2949:18 [INFO] [stdout] | [INFO] [stdout] 2949 | fn new_array(class_file: Arc, data: Box<[NativeJvmValue]>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_class_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/virtual_machine.rs:2949:46 [INFO] [stdout] | [INFO] [stdout] 2949 | fn new_array(class_file: Arc, data: Box<[NativeJvmValue]>) -> Self { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `layout_id` [INFO] [stdout] --> src/virtual_machine.rs:2810:17 [INFO] [stdout] | [INFO] [stdout] 2810 | ... let layout_id = ZVM.as_ref().unwrap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_layout_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `class_file` [INFO] [stdout] --> src/virtual_machine.rs:2949:18 [INFO] [stdout] | [INFO] [stdout] 2949 | fn new_array(class_file: Arc, data: Box<[NativeJvmValue]>) -> Self { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_class_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/virtual_machine.rs:3172:14 [INFO] [stdout] | [INFO] [stdout] 3172 | fn float(v: f32) -> Self { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/virtual_machine.rs:2949:46 [INFO] [stdout] | [INFO] [stdout] 2949 | fn new_array(class_file: Arc, data: Box<[NativeJvmValue]>) -> Self { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/virtual_machine.rs:3176:15 [INFO] [stdout] | [INFO] [stdout] 3176 | fn double(v: f64) -> Self { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/virtual_machine.rs:3180:13 [INFO] [stdout] | [INFO] [stdout] 3180 | fn null(s: String) -> Self { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/virtual_machine.rs:3198:37 [INFO] [stdout] | [INFO] [stdout] 3198 | SimpleJvmValue::Integer(i) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `l` [INFO] [stdout] --> src/virtual_machine.rs:3201:34 [INFO] [stdout] | [INFO] [stdout] 3201 | SimpleJvmValue::Long(l) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_l` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/virtual_machine.rs:3204:35 [INFO] [stdout] | [INFO] [stdout] 3204 | SimpleJvmValue::Float(f) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/virtual_machine.rs:3207:36 [INFO] [stdout] | [INFO] [stdout] 3207 | SimpleJvmValue::Double(f) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `array` [INFO] [stdout] --> src/virtual_machine.rs:3211:35 [INFO] [stdout] | [INFO] [stdout] 3211 | SimpleJvmValue::Array(array) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_array` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine.rs:3407:13 [INFO] [stdout] | [INFO] [stdout] 3407 | let mut obj = Self::ObjectTy::new_inst(class_file); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/virtual_machine.rs:3172:14 [INFO] [stdout] | [INFO] [stdout] 3172 | fn float(v: f32) -> Self { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/virtual_machine.rs:3176:15 [INFO] [stdout] | [INFO] [stdout] 3176 | fn double(v: f64) -> Self { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/virtual_machine.rs:3180:13 [INFO] [stdout] | [INFO] [stdout] 3180 | fn null(s: String) -> Self { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/virtual_machine.rs:3198:37 [INFO] [stdout] | [INFO] [stdout] 3198 | SimpleJvmValue::Integer(i) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `l` [INFO] [stdout] --> src/virtual_machine.rs:3201:34 [INFO] [stdout] | [INFO] [stdout] 3201 | SimpleJvmValue::Long(l) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_l` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/virtual_machine.rs:3204:35 [INFO] [stdout] | [INFO] [stdout] 3204 | SimpleJvmValue::Float(f) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/virtual_machine.rs:3207:36 [INFO] [stdout] | [INFO] [stdout] 3207 | SimpleJvmValue::Double(f) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `array` [INFO] [stdout] --> src/virtual_machine.rs:3211:35 [INFO] [stdout] | [INFO] [stdout] 3211 | SimpleJvmValue::Array(array) => { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_array` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/virtual_machine.rs:3407:13 [INFO] [stdout] | [INFO] [stdout] 3407 | let mut obj = Self::ObjectTy::new_inst(class_file); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `managed_alloc_name` [INFO] [stdout] --> src/compiler/mod.rs:467:17 [INFO] [stdout] | [INFO] [stdout] 467 | let managed_alloc_name = ExternalName::User { namespace: 0, index: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_managed_alloc_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/compiler/mod.rs:567:29 [INFO] [stdout] | [INFO] [stdout] 567 | ... other => { return Err(ir::CompileError::InvalidSignature("managed alloc returned multiple values?")); } [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/compiler/mod.rs:571:48 [INFO] [stdout] | [INFO] [stdout] 571 | ir::Instruction::Dealloc { value } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `value: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/compiler/mod.rs:574:59 [INFO] [stdout] | [INFO] [stdout] 574 | ir::Instruction::CallImport { result, name, sig, args } => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `name: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ret` [INFO] [stdout] --> src/compiler/mod.rs:576:51 [INFO] [stdout] | [INFO] [stdout] 576 | let returns = if let Some(ret) = sig.1 { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ret` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/compiler/mod.rs:616:29 [INFO] [stdout] | [INFO] [stdout] 616 | ... other => { return Err(ir::CompileError::InvalidSignature("call returned multiple values?")); } [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `managed_alloc_name` [INFO] [stdout] --> src/compiler/mod.rs:467:17 [INFO] [stdout] | [INFO] [stdout] 467 | let managed_alloc_name = ExternalName::User { namespace: 0, index: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_managed_alloc_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/compiler/mod.rs:567:29 [INFO] [stdout] | [INFO] [stdout] 567 | ... other => { return Err(ir::CompileError::InvalidSignature("managed alloc returned multiple values?")); } [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/compiler/mod.rs:571:48 [INFO] [stdout] | [INFO] [stdout] 571 | ir::Instruction::Dealloc { value } => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `value: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/compiler/mod.rs:574:59 [INFO] [stdout] | [INFO] [stdout] 574 | ir::Instruction::CallImport { result, name, sig, args } => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `name: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ret` [INFO] [stdout] --> src/compiler/mod.rs:576:51 [INFO] [stdout] | [INFO] [stdout] 576 | let returns = if let Some(ret) = sig.1 { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ret` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/compiler/mod.rs:616:29 [INFO] [stdout] | [INFO] [stdout] 616 | ... other => { return Err(ir::CompileError::InvalidSignature("call returned multiple values?")); } [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/compiler/mod.rs:1421:10 [INFO] [stdout] | [INFO] [stdout] 1421 | for (i, cls) in extra_classes.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `attributes` is never read [INFO] [stdout] --> src/class_file/unvalidated/field.rs:46:16 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct FieldInfo { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 46 | pub(crate) attributes: Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FieldInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `max_stack` is never read [INFO] [stdout] --> src/class_file/validated/method.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct MethodBody { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 25 | pub(crate) max_stack: u16, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MethodBody` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NativeJvmValue` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:2718:12 [INFO] [stdout] | [INFO] [stdout] 2718 | pub struct NativeJvmValue { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NativeJvmObject` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:2742:12 [INFO] [stdout] | [INFO] [stdout] 2742 | pub struct NativeJvmObject { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `zvm_layout_id` and `zvm_vtable` are never used [INFO] [stdout] --> src/virtual_machine.rs:2750:19 [INFO] [stdout] | [INFO] [stdout] 2749 | impl NativeJvmObject { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 2750 | extern "C" fn zvm_layout_id(&self) -> crate::compiler::ir::LayoutId { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 2759 | extern "C" fn zvm_vtable(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ZvmObjectVTable` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:2773:8 [INFO] [stdout] | [INFO] [stdout] 2773 | struct ZvmObjectVTable { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NativeJvmArray` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:2862:12 [INFO] [stdout] | [INFO] [stdout] 2862 | pub struct NativeJvmArray { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NativeJvmArrayData` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:2890:12 [INFO] [stdout] | [INFO] [stdout] 2890 | pub struct NativeJvmArrayData { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NativeJvmSummary` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:3084:12 [INFO] [stdout] | [INFO] [stdout] 3084 | pub struct NativeJvmSummary<'v> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ValueRef` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:3485:19 [INFO] [stdout] | [INFO] [stdout] 3485 | pub(crate) struct ValueRef(ValueImpl); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `of` is never used [INFO] [stdout] --> src/virtual_machine.rs:3488:12 [INFO] [stdout] | [INFO] [stdout] 3487 | impl ValueRef { [INFO] [stdout] | --------------------------------------------- associated function in this implementation [INFO] [stdout] 3488 | pub fn of(reference: &ValueImpl) -> Self { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `has_instance_field`, `get_instance_field`, and `put_instance_field` are never used [INFO] [stdout] --> src/virtual_machine.rs:3609:8 [INFO] [stdout] | [INFO] [stdout] 3595 | impl VirtualMachine { [INFO] [stdout] | --------------------------------------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 3609 | fn has_instance_field( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 3641 | fn get_instance_field( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 3657 | fn put_instance_field( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `ty` is never read [INFO] [stdout] --> src/virtual_machine.rs:3955:22 [INFO] [stdout] | [INFO] [stdout] 3955 | pub struct Arg { pub ty: ir::ValueType } [INFO] [stdout] | --- ^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Arg` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FunctionEmitter` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:312:12 [INFO] [stdout] | [INFO] [stdout] 312 | pub struct FunctionEmitter { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `data_mut`, `data`, `link`, and `finalize` are never used [INFO] [stdout] --> src/compiler/mod.rs:318:8 [INFO] [stdout] | [INFO] [stdout] 317 | impl FunctionEmitter { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] 318 | fn data_mut(&mut self) -> &mut [u8] { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 323 | fn data(&self) -> &[u8] { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 328 | fn link(&mut self, relocs: &[cranelift_codegen::MachReloc], rt_info: &dyn RuntimeInfo) -> Result<(), crate::compiler::ir::Compi... [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 346 | fn finalize(self) -> (*mut u8, usize) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CompiledMethod` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | pub struct CompiledMethod { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `data_mut` and `data` are never used [INFO] [stdout] --> src/compiler/mod.rs:369:8 [INFO] [stdout] | [INFO] [stdout] 368 | impl CompiledMethod { [INFO] [stdout] | ------------------- methods in this implementation [INFO] [stdout] 369 | fn data_mut(&mut self) -> &mut [u8] { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 374 | fn data(&self) -> &[u8] { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `arguments`, `locals`, `blocks`, and `returns` are never read [INFO] [stdout] --> src/compiler/mod.rs:383:5 [INFO] [stdout] | [INFO] [stdout] 382 | pub struct ZvmMethod { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 383 | arguments: Vec, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 384 | locals: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 385 | blocks: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 386 | returns: Option, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ZvmMethod` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `RuntimeInfo` is never used [INFO] [stdout] --> src/compiler/mod.rs:391:11 [INFO] [stdout] | [INFO] [stdout] 391 | pub trait RuntimeInfo: Sync { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `compile` is never used [INFO] [stdout] --> src/compiler/mod.rs:416:12 [INFO] [stdout] | [INFO] [stdout] 415 | impl ZvmMethod { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 416 | pub fn compile(&self, rt_info: &dyn RuntimeInfo) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `blocks` and `layouts` are never read [INFO] [stdout] --> src/compiler/mod.rs:722:5 [INFO] [stdout] | [INFO] [stdout] 720 | struct TranslatorState<'layouts> { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 721 | current_block: ir::Block, [INFO] [stdout] 722 | blocks: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 728 | layouts: &'layouts ir::LayoutsInfo, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TranslatorState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `desc_to_ir_valuety` is never used [INFO] [stdout] --> src/compiler/mod.rs:863:4 [INFO] [stdout] | [INFO] [stdout] 863 | fn desc_to_ir_valuety(desc: &str) -> ir::ValueType { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bytecode2ir` is never used [INFO] [stdout] --> src/compiler/mod.rs:871:8 [INFO] [stdout] | [INFO] [stdout] 871 | pub fn bytecode2ir(rt_info: &mut dyn RuntimeInfo, method: &MethodBody, sig: (Vec, Option)) -> Result src/compiler/mod.rs:1115:23 [INFO] [stdout] | [INFO] [stdout] 1115 | pub(crate) static mut ZVM: Option<&'static mut dyn RuntimeInfo> = None; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `StructLayout` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:1119:12 [INFO] [stdout] | [INFO] [stdout] 1119 | pub struct StructLayout { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `header_size` and `header_align` are never used [INFO] [stdout] --> src/compiler/mod.rs:1126:14 [INFO] [stdout] | [INFO] [stdout] 1125 | impl StructLayout { [INFO] [stdout] | ----------------- associated functions in this implementation [INFO] [stdout] 1126 | const fn header_size() -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1139 | const fn header_align() -> usize { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ZvmRuntime` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:1146:12 [INFO] [stdout] | [INFO] [stdout] 1146 | pub struct ZvmRuntime { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `init` and `runtime_alloc_func` are never used [INFO] [stdout] --> src/compiler/mod.rs:1154:12 [INFO] [stdout] | [INFO] [stdout] 1153 | impl ZvmRuntime { [INFO] [stdout] | --------------- associated functions in this implementation [INFO] [stdout] 1154 | pub fn init() -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 1162 | fn runtime_alloc_func(layout_id: u64) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `jit` is never used [INFO] [stdout] --> src/compiler/mod.rs:1398:4 [INFO] [stdout] | [INFO] [stdout] 1398 | fn jit(args: &[i64], instructions: Vec, signature: &'static str, extra_classes: Vec>, rt_in... [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `jitcall` is never used [INFO] [stdout] --> src/compiler/mod.rs:1471:4 [INFO] [stdout] | [INFO] [stdout] 1471 | fn jitcall(args: &[i64], code: fn(i64, i64, i64, i64, i64, i64) -> i64) -> i64 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Value` is never used [INFO] [stdout] --> src/compiler/mod.rs:16:14 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum Value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Const` is never used [INFO] [stdout] --> src/compiler/mod.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | pub enum Const { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Byte` and `Short` are never constructed [INFO] [stdout] --> src/compiler/mod.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 44 | pub enum ValueType { [INFO] [stdout] | --------- variants in this enum [INFO] [stdout] 45 | Byte, [INFO] [stdout] | ^^^^ [INFO] [stdout] 46 | Short, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ValueType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `size` is never used [INFO] [stdout] --> src/compiler/mod.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl ValueType { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 55 | fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Const` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 85 | pub enum ValuePool { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 88 | Const, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ValuePool` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `constant` is never used [INFO] [stdout] --> src/compiler/mod.rs:112:16 [INFO] [stdout] | [INFO] [stdout] 97 | impl ValueRef { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 112 | pub fn constant(id: usize) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FunctionRef` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | struct FunctionRef { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `result`, `source`, and `id` are never read [INFO] [stdout] --> src/compiler/mod.rs:126:19 [INFO] [stdout] | [INFO] [stdout] 126 | LoadArg { result: ValueRef, source: ValueRef, id: usize }, [INFO] [stdout] | ------- ^^^^^^ ^^^^^^ ^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Instruction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/compiler/mod.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 125 | pub enum Instruction { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 126 | LoadArg { result: ValueRef, source: ValueRef, id: usize }, [INFO] [stdout] 127 | ConstInt { result: ValueRef, value: i32 }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 128 | ConstLong { result: ValueRef, value: i64 }, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 129 | IntAdd { result: ValueRef, left: ValueRef, right: ValueRef }, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 130 | IntXor { result: ValueRef, left: ValueRef, right: ValueRef }, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 131 | AReturn { retval: ValueRef }, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 132 | IReturn { retval: ValueRef }, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 133 | TypeAdjust { value: ValueRef, current_ty: ValueType, result: ValueRef, new_ty: ValueType }, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 134 | GetField { result: ValueRef, object: ValueRef, field_desc: LayoutFieldRef }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 135 | SetField { target: ValueRef, value: ValueRef, field_desc: LayoutFieldRef }, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 136 | Alloc { result: ValueRef, layout_id: LayoutId }, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 137 | Dealloc { value: ValueRef }, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 138 | CallImport { result: Option, name: String, sig: (Vec, Option), args: Vec }, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 139 | Return, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Instruction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `instructions` is never used [INFO] [stdout] --> src/compiler/mod.rs:158:16 [INFO] [stdout] | [INFO] [stdout] 147 | impl Block { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 158 | pub fn instructions(&self) -> &[Instruction] { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `as_usize` is never used [INFO] [stdout] --> src/compiler/mod.rs:167:16 [INFO] [stdout] | [INFO] [stdout] 166 | impl LayoutId { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 167 | pub fn as_usize(&self) -> usize { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `members` is never read [INFO] [stdout] --> src/compiler/mod.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 176 | pub struct Layout { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 177 | members: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Layout` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_field`, `size`, `align`, and `as_tagged_zvm` are never used [INFO] [stdout] --> src/compiler/mod.rs:181:16 [INFO] [stdout] | [INFO] [stdout] 180 | impl Layout { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 181 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 187 | pub fn add_field(&mut self, field_layout: LayoutFieldRef) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 191 | pub fn size(&self) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 195 | pub fn align(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 200 | pub fn as_tagged_zvm(&self, layout_id: u64) -> StructLayout { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `offset`, `ty`, and `name` are never read [INFO] [stdout] --> src/compiler/mod.rs:213:13 [INFO] [stdout] | [INFO] [stdout] 210 | pub struct LayoutFieldRef { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 213 | pub offset: i32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 218 | pub ty: ValueType, [INFO] [stdout] | ^^ [INFO] [stdout] 219 | pub name: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LayoutFieldRef` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_HEADER_ZVM_LAYOUT_ID` is never used [INFO] [stdout] --> src/compiler/mod.rs:222:22 [INFO] [stdout] | [INFO] [stdout] 222 | pub(crate) const OBJ_HEADER_ZVM_LAYOUT_ID: LayoutFieldRef = LayoutFieldRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_HEADER_CLASSFILE_REF` is never used [INFO] [stdout] --> src/compiler/mod.rs:228:22 [INFO] [stdout] | [INFO] [stdout] 228 | pub(crate) const OBJ_HEADER_CLASSFILE_REF: LayoutFieldRef = LayoutFieldRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `layouts_by_name` and `layouts` are never read [INFO] [stdout] --> src/compiler/mod.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 235 | pub struct LayoutsInfo { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] 236 | layouts_by_name: std::collections::HashMap, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] 237 | layouts: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `LayoutsInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `declare`, `get_layout`, `get_layout_id`, and `get_field_in_layout` are never used [INFO] [stdout] --> src/compiler/mod.rs:241:16 [INFO] [stdout] | [INFO] [stdout] 240 | impl LayoutsInfo { [INFO] [stdout] | ---------------- associated items in this implementation [INFO] [stdout] 241 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 248 | pub fn declare(&mut self, layout: Layout, name: String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 254 | pub fn get_layout(&self, layout_id: LayoutId) -> &Layout { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 259 | pub fn get_layout_id(&self, name: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 270 | pub fn get_field_in_layout(&self, layout_id: LayoutId, name: &str) -> &LayoutFieldRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `CompileError` is never used [INFO] [stdout] --> src/compiler/mod.rs:284:14 [INFO] [stdout] | [INFO] [stdout] 284 | pub enum CompileError { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `TranslationError` is never used [INFO] [stdout] --> src/compiler/mod.rs:293:14 [INFO] [stdout] | [INFO] [stdout] 293 | pub enum TranslationError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/compiler/mod.rs:1421:10 [INFO] [stdout] | [INFO] [stdout] 1421 | for (i, cls) in extra_classes.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `attributes` is never read [INFO] [stdout] --> src/class_file/unvalidated/field.rs:46:16 [INFO] [stdout] | [INFO] [stdout] 42 | pub struct FieldInfo { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 46 | pub(crate) attributes: Vec, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FieldInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `max_stack` is never read [INFO] [stdout] --> src/class_file/validated/method.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct MethodBody { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 25 | pub(crate) max_stack: u16, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MethodBody` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `layout_id` is never read [INFO] [stdout] --> src/virtual_machine.rs:2774:5 [INFO] [stdout] | [INFO] [stdout] 2773 | struct ZvmObjectVTable { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 2774 | layout_id: crate::compiler::ir::LayoutId, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `data` is never read [INFO] [stdout] --> src/virtual_machine.rs:2894:5 [INFO] [stdout] | [INFO] [stdout] 2890 | pub struct NativeJvmArrayData { [INFO] [stdout] | ------------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 2894 | data: [NativeJvmValue; 1] [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ValueRef` is never constructed [INFO] [stdout] --> src/virtual_machine.rs:3485:19 [INFO] [stdout] | [INFO] [stdout] 3485 | pub(crate) struct ValueRef(ValueImpl); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `of` is never used [INFO] [stdout] --> src/virtual_machine.rs:3488:12 [INFO] [stdout] | [INFO] [stdout] 3487 | impl ValueRef { [INFO] [stdout] | --------------------------------------------- associated function in this implementation [INFO] [stdout] 3488 | pub fn of(reference: &ValueImpl) -> Self { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/class_file/unvalidated/attribute.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | if exceptions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exceptions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `has_instance_field`, `get_instance_field`, and `put_instance_field` are never used [INFO] [stdout] --> src/virtual_machine.rs:3609:8 [INFO] [stdout] | [INFO] [stdout] 3595 | impl VirtualMachine { [INFO] [stdout] | --------------------------------------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 3609 | fn has_instance_field( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 3641 | fn get_instance_field( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 3657 | fn put_instance_field( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `data` is never used [INFO] [stdout] --> src/compiler/mod.rs:323:8 [INFO] [stdout] | [INFO] [stdout] 317 | impl FunctionEmitter { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 323 | fn data(&self) -> &[u8] { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `relocs` is never read [INFO] [stdout] --> src/compiler/mod.rs:363:5 [INFO] [stdout] | [INFO] [stdout] 360 | pub struct CompiledMethod { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 363 | relocs: Box<[cranelift_codegen::MachReloc]>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `data_mut` is never used [INFO] [stdout] --> src/compiler/mod.rs:369:8 [INFO] [stdout] | [INFO] [stdout] 368 | impl CompiledMethod { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] 369 | fn data_mut(&mut self) -> &mut [u8] { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/class_file/unvalidated/attribute.rs:150:20 [INFO] [stdout] | [INFO] [stdout] 150 | if attributes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!attributes.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `blocks` is never read [INFO] [stdout] --> src/compiler/mod.rs:722:5 [INFO] [stdout] | [INFO] [stdout] 720 | struct TranslatorState<'layouts> { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 721 | current_block: ir::Block, [INFO] [stdout] 722 | blocks: Vec, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `TranslatorState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `layout_id` is never read [INFO] [stdout] --> src/compiler/mod.rs:1122:5 [INFO] [stdout] | [INFO] [stdout] 1119 | pub struct StructLayout { [INFO] [stdout] | ------------ field in this struct [INFO] [stdout] ... [INFO] [stdout] 1122 | layout_id: u64, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Value` is never used [INFO] [stdout] --> src/compiler/mod.rs:16:14 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum Value { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Const` is never used [INFO] [stdout] --> src/compiler/mod.rs:33:14 [INFO] [stdout] | [INFO] [stdout] 33 | pub enum Const { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Byte` and `Short` are never constructed [INFO] [stdout] --> src/compiler/mod.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 44 | pub enum ValueType { [INFO] [stdout] | --------- variants in this enum [INFO] [stdout] 45 | Byte, [INFO] [stdout] | ^^^^ [INFO] [stdout] 46 | Short, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ValueType` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Const` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 85 | pub enum ValuePool { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 88 | Const, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ValuePool` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `constant` is never used [INFO] [stdout] --> src/compiler/mod.rs:112:16 [INFO] [stdout] | [INFO] [stdout] 97 | impl ValueRef { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 112 | pub fn constant(id: usize) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FunctionRef` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:120:12 [INFO] [stdout] | [INFO] [stdout] 120 | struct FunctionRef { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Dealloc` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 125 | pub enum Instruction { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 137 | Dealloc { value: ValueRef }, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Instruction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `OBJ_HEADER_ZVM_LAYOUT_ID` is never used [INFO] [stdout] --> src/compiler/mod.rs:222:22 [INFO] [stdout] | [INFO] [stdout] 222 | pub(crate) const OBJ_HEADER_ZVM_LAYOUT_ID: LayoutFieldRef = LayoutFieldRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/compiler/mod.rs:286:26 [INFO] [stdout] | [INFO] [stdout] 286 | InvalidSignature(&'static str), [INFO] [stdout] | ---------------- ^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `CompileError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 286 - InvalidSignature(&'static str), [INFO] [stdout] 286 + InvalidSignature(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, `2`, and `3` are never read [INFO] [stdout] --> src/compiler/mod.rs:287:27 [INFO] [stdout] | [INFO] [stdout] 287 | InvalidTypeAdjust(ValueRef, ValueType, ValueRef, ValueType), [INFO] [stdout] | ----------------- ^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `CompileError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 287 - InvalidTypeAdjust(ValueRef, ValueType, ValueRef, ValueType), [INFO] [stdout] 287 + InvalidTypeAdjust((), (), (), ()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `InvalidLoad` is never constructed [INFO] [stdout] --> src/compiler/mod.rs:285:9 [INFO] [stdout] | [INFO] [stdout] 284 | pub enum CompileError { [INFO] [stdout] | ------------ variant in this enum [INFO] [stdout] 285 | InvalidLoad(&'static str), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CompileError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/class_file/unvalidated/attribute.rs:143:20 [INFO] [stdout] | [INFO] [stdout] 143 | if exceptions.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!exceptions.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/class_file/unvalidated/attribute.rs:150:20 [INFO] [stdout] | [INFO] [stdout] 150 | if attributes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!attributes.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/class_file/unvalidated/instruction.rs:757:27 [INFO] [stdout] | [INFO] [stdout] 757 | while data.seek(SeekFrom::Current(0))? % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] = note: `#[warn(clippy::seek_from_current)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/class_file/unvalidated/instruction.rs:770:27 [INFO] [stdout] | [INFO] [stdout] 770 | while data.seek(SeekFrom::Current(0))? % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/class_file/unvalidated/instruction.rs:757:27 [INFO] [stdout] | [INFO] [stdout] 757 | while data.seek(SeekFrom::Current(0))? % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] = note: `#[warn(clippy::seek_from_current)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `SeekFrom::Current` to start from current position [INFO] [stdout] --> src/class_file/unvalidated/instruction.rs:770:27 [INFO] [stdout] | [INFO] [stdout] 770 | while data.seek(SeekFrom::Current(0))? % 4 != 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `data.stream_position()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/class_file/unvalidated/class.rs:292:13 [INFO] [stdout] | [INFO] [stdout] 292 | / if field.access_flags.is_static() { [INFO] [stdout] 293 | | if self.get_str(field.name_index) == Some(name) { [INFO] [stdout] 294 | | return true; [INFO] [stdout] 295 | | } [INFO] [stdout] 296 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 292 ~ if field.access_flags.is_static() [INFO] [stdout] 293 ~ && self.get_str(field.name_index) == Some(name) { [INFO] [stdout] 294 | return true; [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/class_file/unvalidated/method.rs:76:40 [INFO] [stdout] | [INFO] [stdout] 76 | let attr_ref: &Attribute = &*attr; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 76 - let attr_ref: &Attribute = &*attr; [INFO] [stdout] 76 + let attr_ref: &Attribute = attr; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 76 | let attr_ref: &Attribute = &**attr; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/class_file/unvalidated/method.rs:78:39 [INFO] [stdout] | [INFO] [stdout] 78 | return Some(Rc::clone(&attr)); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [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 `if` statement can be collapsed [INFO] [stdout] --> src/class_file/unvalidated/class.rs:292:13 [INFO] [stdout] | [INFO] [stdout] 292 | / if field.access_flags.is_static() { [INFO] [stdout] 293 | | if self.get_str(field.name_index) == Some(name) { [INFO] [stdout] 294 | | return true; [INFO] [stdout] 295 | | } [INFO] [stdout] 296 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 292 ~ if field.access_flags.is_static() [INFO] [stdout] 293 ~ && self.get_str(field.name_index) == Some(name) { [INFO] [stdout] 294 | return true; [INFO] [stdout] 295 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/class_file/unvalidated/constant.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(s)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 61 - if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] 61 + if let Ok(s) = std::str::from_utf8(data) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/class_file/unvalidated/method.rs:76:40 [INFO] [stdout] | [INFO] [stdout] 76 | let attr_ref: &Attribute = &*attr; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 76 - let attr_ref: &Attribute = &*attr; [INFO] [stdout] 76 + let attr_ref: &Attribute = attr; [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 76 | let attr_ref: &Attribute = &**attr; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/class_file/unvalidated/method.rs:78:39 [INFO] [stdout] | [INFO] [stdout] 78 | return Some(Rc::clone(&attr)); [INFO] [stdout] | ^^^^^ help: change this to: `attr` [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: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/class_file/unvalidated/constant.rs:61:17 [INFO] [stdout] | [INFO] [stdout] 61 | if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] = note: `#[warn(clippy::match_result_ok)]` on by default [INFO] [stdout] help: consider matching on `Ok(s)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 61 - if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] 61 + if let Ok(s) = std::str::from_utf8(data) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/class_file/validated/method.rs:92:1 [INFO] [stdout] | [INFO] [stdout] 92 | / fn make_refs<'validation>( [INFO] [stdout] 93 | | inst: &unvalidated::Instruction, [INFO] [stdout] 94 | | max_locals: u16, [INFO] [stdout] 95 | | position: u32, [INFO] [stdout] ... | [INFO] [stdout] 100 | | const_refs: &'validation mut HashMap> [INFO] [stdout] 101 | | ) -> Result<(), ValidationError> { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/class_file/validated/method.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | / if *local_idx >= max_locals { [INFO] [stdout] 115 | | return Err(ValidationError::InvalidMethod("invalid local index")); [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 113 ~ Instruction::ALoad(local_idx) [INFO] [stdout] 114 ~ if *local_idx >= max_locals => { [INFO] [stdout] 115 | return Err(ValidationError::InvalidMethod("invalid local index")); [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:123:39 [INFO] [stdout] | [INFO] [stdout] 123 | class_refs.insert(position as u32, Arc::new(raw_class.get_str(*idx).unwrap().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `position` [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 (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:133:39 [INFO] [stdout] | [INFO] [stdout] 133 | const_refs.insert(position as u32, Arc::new(Constant::String(s.to_string()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:136:39 [INFO] [stdout] | [INFO] [stdout] 136 | const_refs.insert(position as u32, Arc::new(Constant::Integer(*i))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:139:39 [INFO] [stdout] | [INFO] [stdout] 139 | const_refs.insert(position as u32, Arc::new(Constant::Float(*f))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:142:39 [INFO] [stdout] | [INFO] [stdout] 142 | class_refs.insert(position as u32, Arc::new(raw_class.get_str(*idx).unwrap().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:152:39 [INFO] [stdout] | [INFO] [stdout] 152 | const_refs.insert(position as u32, Arc::new(Constant::Long(*l))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:155:39 [INFO] [stdout] | [INFO] [stdout] 155 | const_refs.insert(position as u32, Arc::new(Constant::Double(*d))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:196:35 [INFO] [stdout] | [INFO] [stdout] 196 | field_refs.insert(position as u32, Arc::new(field_ref)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:234:36 [INFO] [stdout] | [INFO] [stdout] 234 | method_refs.insert(position as u32, Arc::new(method_ref)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:268:36 [INFO] [stdout] | [INFO] [stdout] 268 | method_refs.insert(position as u32, Arc::new(method_ref)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: statement with no effect [INFO] [stdout] --> src/class_file/validated/method.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 308 | false; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/class_file/validated/method.rs:92:1 [INFO] [stdout] | [INFO] [stdout] 92 | / fn make_refs<'validation>( [INFO] [stdout] 93 | | inst: &unvalidated::Instruction, [INFO] [stdout] 94 | | max_locals: u16, [INFO] [stdout] 95 | | position: u32, [INFO] [stdout] ... | [INFO] [stdout] 100 | | const_refs: &'validation mut HashMap> [INFO] [stdout] 101 | | ) -> Result<(), ValidationError> { [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/class_file/validated/method.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | / if *local_idx >= max_locals { [INFO] [stdout] 115 | | return Err(ValidationError::InvalidMethod("invalid local index")); [INFO] [stdout] 116 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 113 ~ Instruction::ALoad(local_idx) [INFO] [stdout] 114 ~ if *local_idx >= max_locals => { [INFO] [stdout] 115 | return Err(ValidationError::InvalidMethod("invalid local index")); [INFO] [stdout] 116 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:123:39 [INFO] [stdout] | [INFO] [stdout] 123 | class_refs.insert(position as u32, Arc::new(raw_class.get_str(*idx).unwrap().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `position` [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 (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:133:39 [INFO] [stdout] | [INFO] [stdout] 133 | const_refs.insert(position as u32, Arc::new(Constant::String(s.to_string()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:136:39 [INFO] [stdout] | [INFO] [stdout] 136 | const_refs.insert(position as u32, Arc::new(Constant::Integer(*i))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:139:39 [INFO] [stdout] | [INFO] [stdout] 139 | const_refs.insert(position as u32, Arc::new(Constant::Float(*f))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:142:39 [INFO] [stdout] | [INFO] [stdout] 142 | class_refs.insert(position as u32, Arc::new(raw_class.get_str(*idx).unwrap().to_string())); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:152:39 [INFO] [stdout] | [INFO] [stdout] 152 | const_refs.insert(position as u32, Arc::new(Constant::Long(*l))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:155:39 [INFO] [stdout] | [INFO] [stdout] 155 | const_refs.insert(position as u32, Arc::new(Constant::Double(*d))); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/class_file/validated/method.rs:384:46 [INFO] [stdout] | [INFO] [stdout] 384 | let method_body = &attr.data[(body_start as usize)..][..(code_length as usize)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `body_start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:196:35 [INFO] [stdout] | [INFO] [stdout] 196 | field_refs.insert(position as u32, Arc::new(field_ref)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:234:36 [INFO] [stdout] | [INFO] [stdout] 234 | method_refs.insert(position as u32, Arc::new(method_ref)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/class_file/validated/method.rs:268:36 [INFO] [stdout] | [INFO] [stdout] 268 | method_refs.insert(position as u32, Arc::new(method_ref)); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/class_file/validated/mod.rs:56:46 [INFO] [stdout] | [INFO] [stdout] 56 | Instruction::LdcW(Arc::clone(&const_ref)) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `const_ref` [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: statement with no effect [INFO] [stdout] --> src/class_file/validated/method.rs:308:13 [INFO] [stdout] | [INFO] [stdout] 308 | false; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect [INFO] [stdout] = note: `#[warn(clippy::no_effect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/class_file/validated/mod.rs:234:17 [INFO] [stdout] | [INFO] [stdout] 234 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `4..=11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/class_file/validated/method.rs:384:46 [INFO] [stdout] | [INFO] [stdout] 384 | let method_body = &attr.data[(body_start as usize)..][..(code_length as usize)]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `body_start` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/class_file/validated/mod.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] help: consider matching on `Ok(s)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 298 - if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] 298 + if let Ok(s) = std::str::from_utf8(data) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'cls [INFO] [stdout] --> src/class_file/validated/mod.rs:310:22 [INFO] [stdout] | [INFO] [stdout] 310 | fn checked_const<'cls>(&'cls self, idx: ConstantIdx) -> Result<&'cls unvalidated::Constant, ValidationError> { [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] 310 - fn checked_const<'cls>(&'cls self, idx: ConstantIdx) -> Result<&'cls unvalidated::Constant, ValidationError> { [INFO] [stdout] 310 + fn checked_const(&self, idx: ConstantIdx) -> Result<&unvalidated::Constant, ValidationError> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/class_file/validated/mod.rs:56:46 [INFO] [stdout] | [INFO] [stdout] 56 | Instruction::LdcW(Arc::clone(&const_ref)) [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `const_ref` [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 `if` statement can be collapsed [INFO] [stdout] --> src/class_file/validated/mod.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | / if field.access_flags.is_static() { [INFO] [stdout] 352 | | if field.name == name { [INFO] [stdout] 353 | | return true; [INFO] [stdout] 354 | | } [INFO] [stdout] 355 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 351 ~ if field.access_flags.is_static() [INFO] [stdout] 352 ~ && field.name == name { [INFO] [stdout] 353 | return true; [INFO] [stdout] 354 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/class_file/validated/mod.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if !field.access_flags.is_static() { [INFO] [stdout] 364 | | if field.name == name { [INFO] [stdout] 365 | | return true; [INFO] [stdout] 366 | | } [INFO] [stdout] 367 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 363 ~ if !field.access_flags.is_static() [INFO] [stdout] 364 ~ && field.name == name { [INFO] [stdout] 365 | return true; [INFO] [stdout] 366 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this OR pattern can be rewritten using a range [INFO] [stdout] --> src/class_file/validated/mod.rs:234:17 [INFO] [stdout] | [INFO] [stdout] 234 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `4..=11` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_patterns [INFO] [stdout] = note: `#[warn(clippy::manual_range_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: matching on `Some` with `ok()` is redundant [INFO] [stdout] --> src/class_file/validated/mod.rs:298:13 [INFO] [stdout] | [INFO] [stdout] 298 | if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok [INFO] [stdout] help: consider matching on `Ok(s)` and removing the call to `ok` instead [INFO] [stdout] | [INFO] [stdout] 298 - if let Some(s) = std::str::from_utf8(data).ok() { [INFO] [stdout] 298 + if let Ok(s) = std::str::from_utf8(data) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'cls [INFO] [stdout] --> src/class_file/validated/mod.rs:310:22 [INFO] [stdout] | [INFO] [stdout] 310 | fn checked_const<'cls>(&'cls self, idx: ConstantIdx) -> Result<&'cls unvalidated::Constant, ValidationError> { [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] 310 - fn checked_const<'cls>(&'cls self, idx: ConstantIdx) -> Result<&'cls unvalidated::Constant, ValidationError> { [INFO] [stdout] 310 + fn checked_const(&self, idx: ConstantIdx) -> Result<&unvalidated::Constant, ValidationError> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/class_file/validated/mod.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | / if field.access_flags.is_static() { [INFO] [stdout] 352 | | if field.name == name { [INFO] [stdout] 353 | | return true; [INFO] [stdout] 354 | | } [INFO] [stdout] 355 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 351 ~ if field.access_flags.is_static() [INFO] [stdout] 352 ~ && field.name == name { [INFO] [stdout] 353 | return true; [INFO] [stdout] 354 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/class_file/validated/mod.rs:363:13 [INFO] [stdout] | [INFO] [stdout] 363 | / if !field.access_flags.is_static() { [INFO] [stdout] 364 | | if field.name == name { [INFO] [stdout] 365 | | return true; [INFO] [stdout] 366 | | } [INFO] [stdout] 367 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 363 ~ if !field.access_flags.is_static() [INFO] [stdout] 364 ~ && field.name == name { [INFO] [stdout] 365 | return true; [INFO] [stdout] 366 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / fn _javacall( [INFO] [stdout] 15 | | state: &mut VMState, [INFO] [stdout] 16 | | vm: &mut VirtualMachine, [INFO] [stdout] 17 | | receiver: ValueImpl, [INFO] [stdout] ... | [INFO] [stdout] 22 | | args: &[ValueImpl] [INFO] [stdout] 23 | | ) -> Result<(), VMError> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:278:18 [INFO] [stdout] | [INFO] [stdout] 278 | >(name: &str) -> Option< [INFO] [stdout] | __________________^ [INFO] [stdout] 279 | | ( [INFO] [stdout] 280 | | ClassFile, [INFO] [stdout] 281 | | HashMap< [INFO] [stdout] ... | [INFO] [stdout] 286 | | > { [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: this function has too many arguments (8/7) [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / fn _javacall( [INFO] [stdout] 15 | | state: &mut VMState, [INFO] [stdout] 16 | | vm: &mut VirtualMachine, [INFO] [stdout] 17 | | receiver: ValueImpl, [INFO] [stdout] ... | [INFO] [stdout] 22 | | args: &[ValueImpl] [INFO] [stdout] 23 | | ) -> Result<(), VMError> { [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 424 - print!("\n"); [INFO] [stdout] 424 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:454:13 [INFO] [stdout] | [INFO] [stdout] 454 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 454 - print!("\n"); [INFO] [stdout] 454 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:663:19 [INFO] [stdout] | [INFO] [stdout] 663 | } else if let Some(_) = receiver.as_array() { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if receiver.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:278:18 [INFO] [stdout] | [INFO] [stdout] 278 | >(name: &str) -> Option< [INFO] [stdout] | __________________^ [INFO] [stdout] 279 | | ( [INFO] [stdout] 280 | | ClassFile, [INFO] [stdout] 281 | | HashMap< [INFO] [stdout] ... | [INFO] [stdout] 286 | | > { [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: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 424 - print!("\n"); [INFO] [stdout] 424 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:847:8 [INFO] [stdout] | [INFO] [stdout] 847 | if !receiver.as_type("java/lang/String").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `receiver.as_type("java/lang/String").is_none()` [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: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:454:13 [INFO] [stdout] | [INFO] [stdout] 454 | print!("\n"); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 454 - print!("\n"); [INFO] [stdout] 454 + println!(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:856:38 [INFO] [stdout] | [INFO] [stdout] 856 | .push(ValueImpl::integer(*data.get_elem(*index as usize).expect("valid index").as_integer().expect("works") as i32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*data.get_elem(*index as usize).expect("valid index").as_integer().expect("works"))` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:663:19 [INFO] [stdout] | [INFO] [stdout] 663 | } else if let Some(_) = receiver.as_array() { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if receiver.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:847:8 [INFO] [stdout] | [INFO] [stdout] 847 | if !receiver.as_type("java/lang/String").is_some() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `receiver.as_type("java/lang/String").is_none()` [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: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/virtual_machine/jvm/synthetic.rs:856:38 [INFO] [stdout] | [INFO] [stdout] 856 | .push(ValueImpl::integer(*data.get_elem(*index as usize).expect("valid index").as_integer().expect("works") as i32)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*data.get_elem(*index as usize).expect("valid index").as_integer().expect("works"))` [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: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/virtual_machine.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | / if let CallKind::Static = self { [INFO] [stdout] 80 | | false [INFO] [stdout] 81 | | } else { [INFO] [stdout] 82 | | true [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 79 - if let CallKind::Static = self { [INFO] [stdout] 80 - false [INFO] [stdout] 81 - } else { [INFO] [stdout] 82 - true [INFO] [stdout] 83 - } [INFO] [stdout] 79 + !matches!(self, CallKind::Static) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/virtual_machine.rs:112:31 [INFO] [stdout] | [INFO] [stdout] 112 | self.call_stack.iter().rev().next().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] = note: `#[warn(clippy::manual_next_back)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/virtual_machine.rs:116:35 [INFO] [stdout] | [INFO] [stdout] 116 | self.call_stack.iter_mut().rev().next().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:146:12 [INFO] [stdout] | [INFO] [stdout] 146 | if self.call_stack.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:352:31 [INFO] [stdout] | [INFO] [stdout] 352 | } else if let Some(_) = receiver.as_array() { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if receiver.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/virtual_machine.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | / if let CallKind::Static = self { [INFO] [stdout] 80 | | false [INFO] [stdout] 81 | | } else { [INFO] [stdout] 82 | | true [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 79 - if let CallKind::Static = self { [INFO] [stdout] 80 - false [INFO] [stdout] 81 - } else { [INFO] [stdout] 82 - true [INFO] [stdout] 83 - } [INFO] [stdout] 79 + !matches!(self, CallKind::Static) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/virtual_machine.rs:112:31 [INFO] [stdout] | [INFO] [stdout] 112 | self.call_stack.iter().rev().next().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] = note: `#[warn(clippy::manual_next_back)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual backwards iteration [INFO] [stdout] --> src/virtual_machine.rs:116:35 [INFO] [stdout] | [INFO] [stdout] 116 | self.call_stack.iter_mut().rev().next().unwrap() [INFO] [stdout] | ^^^^^^^^^^^^^ help: use: `.next_back()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_next_back [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:146:12 [INFO] [stdout] | [INFO] [stdout] 146 | if self.call_stack.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/virtual_machine.rs:418:38 [INFO] [stdout] | [INFO] [stdout] 418 | self.call_method(vm, &**method_ref, CallKind::Virtual); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `method_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/virtual_machine.rs:422:38 [INFO] [stdout] | [INFO] [stdout] 422 | self.call_method(vm, &**method_ref, CallKind::Special); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `method_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/virtual_machine.rs:426:38 [INFO] [stdout] | [INFO] [stdout] 426 | self.call_method(vm, &**method_ref, CallKind::Static); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `method_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:352:31 [INFO] [stdout] | [INFO] [stdout] 352 | } else if let Some(_) = receiver.as_array() { [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if receiver.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/virtual_machine.rs:418:38 [INFO] [stdout] | [INFO] [stdout] 418 | self.call_method(vm, &**method_ref, CallKind::Virtual); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `method_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/virtual_machine.rs:422:38 [INFO] [stdout] | [INFO] [stdout] 422 | self.call_method(vm, &**method_ref, CallKind::Special); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `method_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/virtual_machine.rs:426:38 [INFO] [stdout] | [INFO] [stdout] 426 | self.call_method(vm, &**method_ref, CallKind::Static); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `method_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/virtual_machine.rs:1552:36 [INFO] [stdout] | [INFO] [stdout] 1552 | let left = *left as i64; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `*left` [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 (`i64` -> `i64`) [INFO] [stdout] --> src/virtual_machine.rs:1553:37 [INFO] [stdout] | [INFO] [stdout] 1553 | let right = *right as i64; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `*right` [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 (`i64` -> `i64`) [INFO] [stdout] --> src/virtual_machine.rs:1552:36 [INFO] [stdout] | [INFO] [stdout] 1552 | let left = *left as i64; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `*left` [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 (`i64` -> `i64`) [INFO] [stdout] --> src/virtual_machine.rs:1553:37 [INFO] [stdout] | [INFO] [stdout] 1553 | let right = *right as i64; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `*right` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/virtual_machine.rs:2458:62 [INFO] [stdout] | [INFO] [stdout] 2458 | jvm::synthetic::class_object_new(vm, &c) [INFO] [stdout] | ^^ help: change this to: `c` [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/virtual_machine.rs:2477:62 [INFO] [stdout] | [INFO] [stdout] 2477 | jvm::synthetic::class_object_new(vm, &c) [INFO] [stdout] | ^^ help: change this to: `c` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:2513:35 [INFO] [stdout] | [INFO] [stdout] 2513 | } else if let Some(_) = item.as_array() { [INFO] [stdout] | -------^^^^^^^------------------ help: try: `if item.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/virtual_machine.rs:2522:65 [INFO] [stdout] | [INFO] [stdout] 2522 | if cls.this_class.as_str() == name.as_str() { [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 2523 | | stack.push(ValueImpl::integer(1)); [INFO] [stdout] 2524 | | return Ok(None); [INFO] [stdout] 2525 | | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/virtual_machine.rs:2525:74 [INFO] [stdout] | [INFO] [stdout] 2525 | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | __________________________________________________________________________^ [INFO] [stdout] 2526 | | stack.push(ValueImpl::integer(1)); [INFO] [stdout] 2527 | | return Ok(None); [INFO] [stdout] 2528 | | } else if let Some(super_class) = cls.super_class.as_ref() { [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:2544:31 [INFO] [stdout] | [INFO] [stdout] 2544 | } else if let Some(_) = top_of_stack.as_array() { [INFO] [stdout] | -------^^^^^^^-------------------------- help: try: `if top_of_stack.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:2547:31 [INFO] [stdout] | [INFO] [stdout] 2547 | } else if let Some(_) = top_of_stack.as_null() { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if top_of_stack.as_null().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/virtual_machine.rs:2569:56 [INFO] [stdout] | [INFO] [stdout] 2569 | if cls.this_class.as_str() == name { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 2570 | | return Ok(None); [INFO] [stdout] 2571 | | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/virtual_machine.rs:2571:74 [INFO] [stdout] | [INFO] [stdout] 2571 | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | __________________________________________________________________________^ [INFO] [stdout] 2572 | | return Ok(None); [INFO] [stdout] 2573 | | } else if let Some(super_class) = cls.super_class.as_ref() { [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/virtual_machine.rs:2458:62 [INFO] [stdout] | [INFO] [stdout] 2458 | jvm::synthetic::class_object_new(vm, &c) [INFO] [stdout] | ^^ help: change this to: `c` [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/virtual_machine.rs:2477:62 [INFO] [stdout] | [INFO] [stdout] 2477 | jvm::synthetic::class_object_new(vm, &c) [INFO] [stdout] | ^^ help: change this to: `c` [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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:2513:35 [INFO] [stdout] | [INFO] [stdout] 2513 | } else if let Some(_) = item.as_array() { [INFO] [stdout] | -------^^^^^^^------------------ help: try: `if item.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/virtual_machine.rs:2522:65 [INFO] [stdout] | [INFO] [stdout] 2522 | if cls.this_class.as_str() == name.as_str() { [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 2523 | | stack.push(ValueImpl::integer(1)); [INFO] [stdout] 2524 | | return Ok(None); [INFO] [stdout] 2525 | | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/virtual_machine.rs:2525:74 [INFO] [stdout] | [INFO] [stdout] 2525 | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | __________________________________________________________________________^ [INFO] [stdout] 2526 | | stack.push(ValueImpl::integer(1)); [INFO] [stdout] 2527 | | return Ok(None); [INFO] [stdout] 2528 | | } else if let Some(super_class) = cls.super_class.as_ref() { [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:2544:31 [INFO] [stdout] | [INFO] [stdout] 2544 | } else if let Some(_) = top_of_stack.as_array() { [INFO] [stdout] | -------^^^^^^^-------------------------- help: try: `if top_of_stack.as_array().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/virtual_machine.rs:2547:31 [INFO] [stdout] | [INFO] [stdout] 2547 | } else if let Some(_) = top_of_stack.as_null() { [INFO] [stdout] | -------^^^^^^^------------------------- help: try: `if top_of_stack.as_null().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/virtual_machine.rs:2569:56 [INFO] [stdout] | [INFO] [stdout] 2569 | if cls.this_class.as_str() == name { [INFO] [stdout] | ________________________________________________________^ [INFO] [stdout] 2570 | | return Ok(None); [INFO] [stdout] 2571 | | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/virtual_machine.rs:2571:74 [INFO] [stdout] | [INFO] [stdout] 2571 | } else if cls.interfaces.contains(&name.to_string()) { [INFO] [stdout] | __________________________________________________________________________^ [INFO] [stdout] 2572 | | return Ok(None); [INFO] [stdout] 2573 | | } else if let Some(super_class) = cls.super_class.as_ref() { [INFO] [stdout] | |_____________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: sub-expression diverges [INFO] [stdout] --> src/virtual_machine.rs:2810:75 [INFO] [stdout] | [INFO] [stdout] 2810 | ... let layout_id = ZVM.as_ref().unwrap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression [INFO] [stdout] = note: `#[warn(clippy::diverging_sub_expression)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/virtual_machine.rs:2918:14 [INFO] [stdout] | [INFO] [stdout] 2918 | / ((self.data as *const usize) [INFO] [stdout] 2919 | | .offset(1) [INFO] [stdout] 2920 | | as *const NativeJvmValue) [INFO] [stdout] 2921 | | .offset(idx as isize) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 2921 - .offset(idx as isize) [INFO] [stdout] 2921 + .add(idx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `NativeJvmValue` which implements the `Copy` trait [INFO] [stdout] --> src/virtual_machine.rs:2926:14 [INFO] [stdout] | [INFO] [stdout] 2926 | Some(value_ref.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*value_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/virtual_machine.rs:2930:14 [INFO] [stdout] | [INFO] [stdout] 2930 | / ((self.data as *const usize) [INFO] [stdout] 2931 | | .offset(1) [INFO] [stdout] 2932 | | as *const NativeJvmValue [INFO] [stdout] 2933 | | as *mut NativeJvmValue) [INFO] [stdout] 2934 | | .offset(idx as isize) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 2934 - .offset(idx as isize) [INFO] [stdout] 2934 + .add(idx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'data [INFO] [stdout] --> src/virtual_machine.rs:2940:24 [INFO] [stdout] | [INFO] [stdout] 2940 | unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 2940 - unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [INFO] [stdout] 2940 + unsafe fn as_slice(&self) -> Option<&[T]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:2970:9 [INFO] [stdout] | [INFO] [stdout] 2970 | &*self.cls.this_class == &*other.cls.this_class && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2970 - &*self.cls.this_class == &*other.cls.this_class && [INFO] [stdout] 2970 + *self.cls.this_class == *other.cls.this_class && [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:2971:9 [INFO] [stdout] | [INFO] [stdout] 2971 | &*self.data.borrow() == &*other.data.borrow() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2971 - &*self.data.borrow() == &*other.data.borrow() [INFO] [stdout] 2971 + *self.data.borrow() == *other.data.borrow() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/virtual_machine.rs:2984:9 [INFO] [stdout] | [INFO] [stdout] 2984 | self.data.borrow().get(idx).map(|x| x.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.data.borrow().get(idx).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'data [INFO] [stdout] --> src/virtual_machine.rs:2990:24 [INFO] [stdout] | [INFO] [stdout] 2990 | unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 2990 - unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [INFO] [stdout] 2990 + unsafe fn as_slice(&self) -> Option<&[T]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3005:19 [INFO] [stdout] | [INFO] [stdout] 3005 | data: Arc::new(RefCell::new(data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3025:9 [INFO] [stdout] | [INFO] [stdout] 3025 | &self.cls.this_class == &other.cls.this_class && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3025 - &self.cls.this_class == &other.cls.this_class && [INFO] [stdout] 3025 + self.cls.this_class == other.cls.this_class && [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3026:9 [INFO] [stdout] | [INFO] [stdout] 3026 | &*self.fields.borrow() == &*other.fields.borrow() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3026 - &*self.fields.borrow() == &*other.fields.borrow() [INFO] [stdout] 3026 + *self.fields.borrow() == *other.fields.borrow() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3058:21 [INFO] [stdout] | [INFO] [stdout] 3058 | fields: Arc::new(RefCell::new(data)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3064:21 [INFO] [stdout] | [INFO] [stdout] 3064 | fields: Arc::new(RefCell::new(HashMap::new())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3080:35 [INFO] [stdout] | [INFO] [stdout] 3080 | SimpleJvmObject { fields: Arc::new(RefCell::new(fields)), cls: class_file } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/virtual_machine.rs:3100:35 [INFO] [stdout] | [INFO] [stdout] 3100 | NativeJvmSummary { value: &self } [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: sub-expression diverges [INFO] [stdout] --> src/virtual_machine.rs:2810:75 [INFO] [stdout] | [INFO] [stdout] 2810 | ... let layout_id = ZVM.as_ref().unwrap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#diverging_sub_expression [INFO] [stdout] = note: `#[warn(clippy::diverging_sub_expression)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/virtual_machine.rs:3309:9 [INFO] [stdout] | [INFO] [stdout] 3309 | / if let Self::Uninitialized = self { [INFO] [stdout] 3310 | | true [INFO] [stdout] 3311 | | } else { [INFO] [stdout] 3312 | | false [INFO] [stdout] 3313 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 3309 - if let Self::Uninitialized = self { [INFO] [stdout] 3310 - true [INFO] [stdout] 3311 - } else { [INFO] [stdout] 3312 - false [INFO] [stdout] 3313 - } [INFO] [stdout] 3309 + matches!(self, Self::Uninitialized) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/virtual_machine.rs:2918:14 [INFO] [stdout] | [INFO] [stdout] 2918 | / ((self.data as *const usize) [INFO] [stdout] 2919 | | .offset(1) [INFO] [stdout] 2920 | | as *const NativeJvmValue) [INFO] [stdout] 2921 | | .offset(idx as isize) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 2921 - .offset(idx as isize) [INFO] [stdout] 2921 + .add(idx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `NativeJvmValue` which implements the `Copy` trait [INFO] [stdout] --> src/virtual_machine.rs:2926:14 [INFO] [stdout] | [INFO] [stdout] 2926 | Some(value_ref.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*value_ref` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/virtual_machine.rs:2930:14 [INFO] [stdout] | [INFO] [stdout] 2930 | / ((self.data as *const usize) [INFO] [stdout] 2931 | | .offset(1) [INFO] [stdout] 2932 | | as *const NativeJvmValue [INFO] [stdout] 2933 | | as *mut NativeJvmValue) [INFO] [stdout] 2934 | | .offset(idx as isize) [INFO] [stdout] | |_____________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 2934 - .offset(idx as isize) [INFO] [stdout] 2934 + .add(idx) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'data [INFO] [stdout] --> src/virtual_machine.rs:2940:24 [INFO] [stdout] | [INFO] [stdout] 2940 | unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 2940 - unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [INFO] [stdout] 2940 + unsafe fn as_slice(&self) -> Option<&[T]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3461:9 [INFO] [stdout] | [INFO] [stdout] 3461 | return None; [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] 3461 - return None; [INFO] [stdout] 3461 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/virtual_machine.rs:3437:42 [INFO] [stdout] | [INFO] [stdout] 3437 | if let Ok(v) = i64::from_str(&s[..s.len() - 3]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/virtual_machine.rs:3436:9 [INFO] [stdout] | [INFO] [stdout] 3436 | if s.ends_with("i64") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 3436 ~ if let Some() = s.strip_suffix("i64") { [INFO] [stdout] 3437 ~ if let Ok(v) = i64::from_str() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:2970:9 [INFO] [stdout] | [INFO] [stdout] 2970 | &*self.cls.this_class == &*other.cls.this_class && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2970 - &*self.cls.this_class == &*other.cls.this_class && [INFO] [stdout] 2970 + *self.cls.this_class == *other.cls.this_class && [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/virtual_machine.rs:3443:42 [INFO] [stdout] | [INFO] [stdout] 3443 | if let Ok(v) = i32::from_str(&s[..s.len() - 3]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/virtual_machine.rs:3442:9 [INFO] [stdout] | [INFO] [stdout] 3442 | if s.ends_with("i32") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 3442 ~ if let Some() = s.strip_suffix("i32") { [INFO] [stdout] 3443 ~ if let Ok(v) = i32::from_str() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:2971:9 [INFO] [stdout] | [INFO] [stdout] 2971 | &*self.data.borrow() == &*other.data.borrow() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 2971 - &*self.data.borrow() == &*other.data.borrow() [INFO] [stdout] 2971 + *self.data.borrow() == *other.data.borrow() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/virtual_machine.rs:2984:9 [INFO] [stdout] | [INFO] [stdout] 2984 | self.data.borrow().get(idx).map(|x| x.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.data.borrow().get(idx).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'data [INFO] [stdout] --> src/virtual_machine.rs:3482:24 [INFO] [stdout] | [INFO] [stdout] 3482 | unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]>; [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 3482 - unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]>; [INFO] [stdout] 3482 + unsafe fn as_slice(&self) -> Option<&[T]>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'data [INFO] [stdout] --> src/virtual_machine.rs:2990:24 [INFO] [stdout] | [INFO] [stdout] 2990 | unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 2990 - unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]> { [INFO] [stdout] 2990 + unsafe fn as_slice(&self) -> Option<&[T]> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3503:9 [INFO] [stdout] | [INFO] [stdout] 3503 | &self.0 == &other.0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3503 - &self.0 == &other.0 [INFO] [stdout] 3503 + self.0 == other.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3005:19 [INFO] [stdout] | [INFO] [stdout] 3005 | data: Arc::new(RefCell::new(data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3528:17 [INFO] [stdout] | [INFO] [stdout] 3528 | &cls.this_class == &other_cls.this_class && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3528 - &cls.this_class == &other_cls.this_class && [INFO] [stdout] 3528 + cls.this_class == other_cls.this_class && [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3025:9 [INFO] [stdout] | [INFO] [stdout] 3025 | &self.cls.this_class == &other.cls.this_class && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3025 - &self.cls.this_class == &other.cls.this_class && [INFO] [stdout] 3025 + self.cls.this_class == other.cls.this_class && [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3026:9 [INFO] [stdout] | [INFO] [stdout] 3026 | &*self.fields.borrow() == &*other.fields.borrow() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3026 - &*self.fields.borrow() == &*other.fields.borrow() [INFO] [stdout] 3026 + *self.fields.borrow() == *other.fields.borrow() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine.rs:3569:19 [INFO] [stdout] | [INFO] [stdout] 3569 | native_impls: HashMap, &mut VirtualMachine) -> Result<(), VMError>>, [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] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3058:21 [INFO] [stdout] | [INFO] [stdout] 3058 | fields: Arc::new(RefCell::new(data)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3064:21 [INFO] [stdout] | [INFO] [stdout] 3064 | fields: Arc::new(RefCell::new(HashMap::new())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3616:13 [INFO] [stdout] | [INFO] [stdout] 3616 | 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] 3616 - return true; [INFO] [stdout] 3616 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3620:13 [INFO] [stdout] | [INFO] [stdout] 3620 | return self.has_instance_field(&sup, name); [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] 3620 - return self.has_instance_field(&sup, name); [INFO] [stdout] 3620 + self.has_instance_field(&sup, name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3622:13 [INFO] [stdout] | [INFO] [stdout] 3622 | return false; [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] 3622 - return false; [INFO] [stdout] 3622 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/virtual_machine.rs:3080:35 [INFO] [stdout] | [INFO] [stdout] 3080 | SimpleJvmObject { fields: Arc::new(RefCell::new(fields)), cls: class_file } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc>>` is not `Send` and `Sync` as `RefCell>` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `RefCell>` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3632:13 [INFO] [stdout] | [INFO] [stdout] 3632 | 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] 3632 - return true; [INFO] [stdout] 3632 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3635:13 [INFO] [stdout] | [INFO] [stdout] 3635 | return self.is_exception(&sup, name); [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] 3635 - return self.is_exception(&sup, name); [INFO] [stdout] 3635 + self.is_exception(&sup, name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3637:13 [INFO] [stdout] | [INFO] [stdout] 3637 | return false; [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] 3637 - return false; [INFO] [stdout] 3637 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/virtual_machine.rs:3100:35 [INFO] [stdout] | [INFO] [stdout] 3100 | NativeJvmSummary { value: &self } [INFO] [stdout] | ^^^^^ help: change this to: `self` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine.rs:3709:81 [INFO] [stdout] | [INFO] [stdout] 3709 | ...iptor: String) -> Option, &mut VirtualMachine) -> Result<(), VMError>> { [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine.rs:3731:26 [INFO] [stdout] | [INFO] [stdout] 3731 | ...ut res: Option<(ClassFile, HashMap<(String, String), crate::virtual_machine::jvm::synthetic::NativeJvmFn>)> = None; [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] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/virtual_machine.rs:3309:9 [INFO] [stdout] | [INFO] [stdout] 3309 | / if let Self::Uninitialized = self { [INFO] [stdout] 3310 | | true [INFO] [stdout] 3311 | | } else { [INFO] [stdout] 3312 | | false [INFO] [stdout] 3313 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 3309 - if let Self::Uninitialized = self { [INFO] [stdout] 3310 - true [INFO] [stdout] 3311 - } else { [INFO] [stdout] 3312 - false [INFO] [stdout] 3313 - } [INFO] [stdout] 3309 + matches!(self, Self::Uninitialized) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3461:9 [INFO] [stdout] | [INFO] [stdout] 3461 | return None; [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] 3461 - return None; [INFO] [stdout] 3461 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/virtual_machine.rs:3437:42 [INFO] [stdout] | [INFO] [stdout] 3437 | if let Ok(v) = i64::from_str(&s[..s.len() - 3]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/virtual_machine.rs:3436:9 [INFO] [stdout] | [INFO] [stdout] 3436 | if s.ends_with("i64") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 3436 ~ if let Some() = s.strip_suffix("i64") { [INFO] [stdout] 3437 ~ if let Ok(v) = i64::from_str() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a suffix manually [INFO] [stdout] --> src/virtual_machine.rs:3443:42 [INFO] [stdout] | [INFO] [stdout] 3443 | if let Ok(v) = i32::from_str(&s[..s.len() - 3]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the suffix was tested here [INFO] [stdout] --> src/virtual_machine.rs:3442:9 [INFO] [stdout] | [INFO] [stdout] 3442 | if s.ends_with("i32") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_suffix` method [INFO] [stdout] | [INFO] [stdout] 3442 ~ if let Some() = s.strip_suffix("i32") { [INFO] [stdout] 3443 ~ if let Ok(v) = i32::from_str() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:3877:45 [INFO] [stdout] | [INFO] [stdout] 3877 | while state.throwing && state.call_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!state.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'data [INFO] [stdout] --> src/virtual_machine.rs:3482:24 [INFO] [stdout] | [INFO] [stdout] 3482 | unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]>; [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] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 3482 - unsafe fn as_slice<'data, T>(&'data self) -> Option<&'data [T]>; [INFO] [stdout] 3482 + unsafe fn as_slice(&self) -> Option<&[T]>; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3503:9 [INFO] [stdout] | [INFO] [stdout] 3503 | &self.0 == &other.0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3503 - &self.0 == &other.0 [INFO] [stdout] 3503 + self.0 == other.0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of both operands [INFO] [stdout] --> src/virtual_machine.rs:3528:17 [INFO] [stdout] | [INFO] [stdout] 3528 | &cls.this_class == &other_cls.this_class && [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 3528 - &cls.this_class == &other_cls.this_class && [INFO] [stdout] 3528 + cls.this_class == other_cls.this_class && [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:3906:33 [INFO] [stdout] | [INFO] [stdout] 3906 | assert!(state.call_stack.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:3921:24 [INFO] [stdout] | [INFO] [stdout] 3921 | if state.call_stack.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine.rs:3569:19 [INFO] [stdout] | [INFO] [stdout] 3569 | native_impls: HashMap, &mut VirtualMachine) -> Result<(), VMError>>, [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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3616:13 [INFO] [stdout] | [INFO] [stdout] 3616 | 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] 3616 - return true; [INFO] [stdout] 3616 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3620:13 [INFO] [stdout] | [INFO] [stdout] 3620 | return self.has_instance_field(&sup, name); [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] 3620 - return self.has_instance_field(&sup, name); [INFO] [stdout] 3620 + self.has_instance_field(&sup, name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3622:13 [INFO] [stdout] | [INFO] [stdout] 3622 | return false; [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] 3622 - return false; [INFO] [stdout] 3622 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3632:13 [INFO] [stdout] | [INFO] [stdout] 3632 | 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] 3632 - return true; [INFO] [stdout] 3632 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3635:13 [INFO] [stdout] | [INFO] [stdout] 3635 | return self.is_exception(&sup, name); [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] 3635 - return self.is_exception(&sup, name); [INFO] [stdout] 3635 + self.is_exception(&sup, name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/virtual_machine.rs:3637:13 [INFO] [stdout] | [INFO] [stdout] 3637 | return false; [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] 3637 - return false; [INFO] [stdout] 3637 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine.rs:3709:81 [INFO] [stdout] | [INFO] [stdout] 3709 | ...iptor: String) -> Option, &mut VirtualMachine) -> Result<(), VMError>> { [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] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/virtual_machine.rs:3731:26 [INFO] [stdout] | [INFO] [stdout] 3731 | ...ut res: Option<(ClassFile, HashMap<(String, String), crate::virtual_machine::jvm::synthetic::NativeJvmFn>)> = None; [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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:3877:45 [INFO] [stdout] | [INFO] [stdout] 3877 | while state.throwing && state.call_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!state.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:3906:33 [INFO] [stdout] | [INFO] [stdout] 3906 | assert!(state.call_stack.len() == 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/virtual_machine.rs:3921:24 [INFO] [stdout] | [INFO] [stdout] 3921 | if state.call_stack.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `state.call_stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.as_ref().map(|x| x.as_str())` on an `Option` value [INFO] [stdout] --> src/compiler/mod.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | .find(|member| member.name.as_ref().map(|x| x.as_str()) == Some(name)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `member.name.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same prefix: `Invalid` [INFO] [stdout] --> src/compiler/mod.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | / pub enum CompileError { [INFO] [stdout] 285 | | InvalidLoad(&'static str), [INFO] [stdout] 286 | | InvalidSignature(&'static str), [INFO] [stdout] 287 | | InvalidTypeAdjust(ValueRef, ValueType, ValueRef, ValueType), [INFO] [stdout] 288 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` 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/compiler/mod.rs:491:47 [INFO] [stdout] | [INFO] [stdout] 491 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:492:48 [INFO] [stdout] | [INFO] [stdout] 492 | let _source = vars.get(&source).expect("source var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `source` [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/compiler/mod.rs:497:47 [INFO] [stdout] | [INFO] [stdout] 497 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:502:47 [INFO] [stdout] | [INFO] [stdout] 502 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:507:45 [INFO] [stdout] | [INFO] [stdout] 507 | let left = vars.get(&left).expect("result var is defined"); [INFO] [stdout] | ^^^^^ help: change this to: `left` [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/compiler/mod.rs:508:46 [INFO] [stdout] | [INFO] [stdout] 508 | let right = vars.get(&right).expect("result var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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/compiler/mod.rs:513:47 [INFO] [stdout] | [INFO] [stdout] 513 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:517:45 [INFO] [stdout] | [INFO] [stdout] 517 | let left = vars.get(&left).expect("result var is defined"); [INFO] [stdout] | ^^^^^ help: change this to: `left` [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/compiler/mod.rs:518:46 [INFO] [stdout] | [INFO] [stdout] 518 | let right = vars.get(&right).expect("result var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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/compiler/mod.rs:523:47 [INFO] [stdout] | [INFO] [stdout] 523 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:527:47 [INFO] [stdout] | [INFO] [stdout] 527 | let retval = vars.get(&retval).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `retval` [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/compiler/mod.rs:532:47 [INFO] [stdout] | [INFO] [stdout] 532 | let retval = vars.get(&retval).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `retval` [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/compiler/mod.rs:537:47 [INFO] [stdout] | [INFO] [stdout] 537 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:620:47 [INFO] [stdout] | [INFO] [stdout] 620 | let object = vars.get(&object).expect("object var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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/compiler/mod.rs:634:47 [INFO] [stdout] | [INFO] [stdout] 634 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:638:47 [INFO] [stdout] | [INFO] [stdout] 638 | let target = vars.get(&target).expect("target var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [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/compiler/mod.rs:640:46 [INFO] [stdout] | [INFO] [stdout] 640 | let value = vars.get(&value).expect("value var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/compiler/mod.rs:664:54 [INFO] [stdout] | [INFO] [stdout] 664 | ... let input = vars.get(&value).expect("source var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/compiler/mod.rs:666:55 [INFO] [stdout] | [INFO] [stdout] 666 | ... let result = vars.get(&result).expect("source var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:671:54 [INFO] [stdout] | [INFO] [stdout] 671 | ... let input = vars.get(&value).expect("source var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/compiler/mod.rs:673:55 [INFO] [stdout] | [INFO] [stdout] 673 | ... let result = vars.get(&result).expect("source var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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: called `.as_ref().map(|x| x.as_str())` on an `Option` value [INFO] [stdout] --> src/compiler/mod.rs:276:32 [INFO] [stdout] | [INFO] [stdout] 276 | .find(|member| member.name.as_ref().map(|x| x.as_str()) == Some(name)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `member.name.as_deref()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref [INFO] [stdout] = note: `#[warn(clippy::option_as_ref_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same prefix: `Invalid` [INFO] [stdout] --> src/compiler/mod.rs:284:5 [INFO] [stdout] | [INFO] [stdout] 284 | / pub enum CompileError { [INFO] [stdout] 285 | | InvalidLoad(&'static str), [INFO] [stdout] 286 | | InvalidSignature(&'static str), [INFO] [stdout] 287 | | InvalidTypeAdjust(ValueRef, ValueType, ValueRef, ValueType), [INFO] [stdout] 288 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: remove the prefixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant slicing of the whole range [INFO] [stdout] --> src/compiler/mod.rs:707:51 [INFO] [stdout] | [INFO] [stdout] 707 | function_bytes.data_mut().copy_from_slice(&bytes[..]); [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/compiler/mod.rs:880:5 [INFO] [stdout] | [INFO] [stdout] 880 | while let Some(instruction) = instructions.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for instruction in instructions` [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/compiler/mod.rs:491:47 [INFO] [stdout] | [INFO] [stdout] 491 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:492:48 [INFO] [stdout] | [INFO] [stdout] 492 | let _source = vars.get(&source).expect("source var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `source` [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/compiler/mod.rs:497:47 [INFO] [stdout] | [INFO] [stdout] 497 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:502:47 [INFO] [stdout] | [INFO] [stdout] 502 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:507:45 [INFO] [stdout] | [INFO] [stdout] 507 | let left = vars.get(&left).expect("result var is defined"); [INFO] [stdout] | ^^^^^ help: change this to: `left` [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/compiler/mod.rs:508:46 [INFO] [stdout] | [INFO] [stdout] 508 | let right = vars.get(&right).expect("result var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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/compiler/mod.rs:513:47 [INFO] [stdout] | [INFO] [stdout] 513 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:517:45 [INFO] [stdout] | [INFO] [stdout] 517 | let left = vars.get(&left).expect("result var is defined"); [INFO] [stdout] | ^^^^^ help: change this to: `left` [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/compiler/mod.rs:518:46 [INFO] [stdout] | [INFO] [stdout] 518 | let right = vars.get(&right).expect("result var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `right` [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/compiler/mod.rs:523:47 [INFO] [stdout] | [INFO] [stdout] 523 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:527:47 [INFO] [stdout] | [INFO] [stdout] 527 | let retval = vars.get(&retval).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `retval` [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/compiler/mod.rs:532:47 [INFO] [stdout] | [INFO] [stdout] 532 | let retval = vars.get(&retval).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `retval` [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/compiler/mod.rs:537:47 [INFO] [stdout] | [INFO] [stdout] 537 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:620:47 [INFO] [stdout] | [INFO] [stdout] 620 | let object = vars.get(&object).expect("object var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `object` [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/compiler/mod.rs:634:47 [INFO] [stdout] | [INFO] [stdout] 634 | let result = vars.get(&result).expect("result var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:638:47 [INFO] [stdout] | [INFO] [stdout] 638 | let target = vars.get(&target).expect("target var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `target` [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/compiler/mod.rs:640:46 [INFO] [stdout] | [INFO] [stdout] 640 | let value = vars.get(&value).expect("value var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: transmute from a pointer type (`*const class_file::validated::method::MethodRef`) to a reference type (`&class_file::validated::method::MethodRef`) [INFO] [stdout] --> src/compiler/mod.rs:1177:35 [INFO] [stdout] | [INFO] [stdout] 1177 | let method_ref = unsafe { std::mem::transmute::<*const MethodRef, &MethodRef>(method_ref) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*method_ref.cast::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref [INFO] [stdout] = note: `#[warn(clippy::transmute_ptr_to_ref)]` 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/compiler/mod.rs:664:54 [INFO] [stdout] | [INFO] [stdout] 664 | ... let input = vars.get(&value).expect("source var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/compiler/mod.rs:666:55 [INFO] [stdout] | [INFO] [stdout] 666 | ... let result = vars.get(&result).expect("source var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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/compiler/mod.rs:671:54 [INFO] [stdout] | [INFO] [stdout] 671 | ... let input = vars.get(&value).expect("source var is defined"); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/compiler/mod.rs:673:55 [INFO] [stdout] | [INFO] [stdout] 673 | ... let result = vars.get(&result).expect("source var is defined"); [INFO] [stdout] | ^^^^^^^ help: change this to: `result` [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: redundant slicing of the whole range [INFO] [stdout] --> src/compiler/mod.rs:707:51 [INFO] [stdout] | [INFO] [stdout] 707 | function_bytes.data_mut().copy_from_slice(&bytes[..]); [INFO] [stdout] | ^^^^^^^^^^ help: use the original value instead: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/compiler/mod.rs:1222:26 [INFO] [stdout] | [INFO] [stdout] 1222 | unsafe { res.offset(b as isize).write(0u8); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 1222 - unsafe { res.offset(b as isize).write(0u8); } [INFO] [stdout] 1222 + unsafe { res.add(b).write(0u8); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/compiler/mod.rs:1224:27 [INFO] [stdout] | [INFO] [stdout] 1224 | Some(unsafe { res.offset(StructLayout::header_size() as isize) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 1224 - Some(unsafe { res.offset(StructLayout::header_size() as isize) }) [INFO] [stdout] 1224 + Some(unsafe { res.add(StructLayout::header_size()) }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/compiler/mod.rs:1243:12 [INFO] [stdout] | [INFO] [stdout] 1243 | if ptr == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] = note: `#[warn(clippy::cmp_null)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/compiler/mod.rs:1403:5 [INFO] [stdout] | [INFO] [stdout] 1403 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/compiler/mod.rs:1439:5 [INFO] [stdout] | [INFO] [stdout] 1439 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/compiler/mod.rs:1441:5 [INFO] [stdout] | [INFO] [stdout] 1441 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `for` loop [INFO] [stdout] --> src/compiler/mod.rs:880:5 [INFO] [stdout] | [INFO] [stdout] 880 | while let Some(instruction) = instructions.next() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for instruction in instructions` [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: transmute used without annotations [INFO] [stdout] --> src/compiler/mod.rs:1466:48 [INFO] [stdout] | [INFO] [stdout] 1466 | let res = jitcall(args, unsafe { std::mem::transmute(function.data().as_ptr()) }); [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const u8, fn(i64, i64, i64, i64, i64, i64) -> i64>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/compiler/mod.rs:1474:5 [INFO] [stdout] | [INFO] [stdout] 1474 | / for i in 0..args.len() { [INFO] [stdout] 1475 | | actual_args[i] = args[i]; [INFO] [stdout] 1476 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `actual_args[..args.len()].copy_from_slice(&args[..]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/class_file/validated/method.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn iter_from(&self, offset: u32) -> MethodInstrIter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 38 | pub fn iter_from(&self, offset: u32) -> MethodInstrIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` fn uses type `compiler::ir::LayoutId`, which is not FFI-safe [INFO] [stdout] --> src/virtual_machine.rs:2750:43 [INFO] [stdout] | [INFO] [stdout] 2750 | extern "C" fn zvm_layout_id(&self) -> crate::compiler::ir::LayoutId { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe [INFO] [stdout] | [INFO] [stdout] = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct [INFO] [stdout] = note: this struct has unspecified layout [INFO] [stdout] note: the type is defined here [INFO] [stdout] --> src/compiler/mod.rs:164:5 [INFO] [stdout] | [INFO] [stdout] 164 | pub struct LayoutId(pub usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(improper_ctypes_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` fn uses type `std::sync::Arc`, which is not FFI-safe [INFO] [stdout] --> src/virtual_machine.rs:2759:40 [INFO] [stdout] | [INFO] [stdout] 2759 | extern "C" fn zvm_vtable(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not FFI-safe [INFO] [stdout] | [INFO] [stdout] = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct [INFO] [stdout] = note: this struct has unspecified layout [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2810:29 [INFO] [stdout] | [INFO] [stdout] 2810 | ... let layout_id = ZVM.as_ref().unwrap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute from a pointer type (`*const class_file::validated::method::MethodRef`) to a reference type (`&class_file::validated::method::MethodRef`) [INFO] [stdout] --> src/compiler/mod.rs:1177:35 [INFO] [stdout] | [INFO] [stdout] 1177 | let method_ref = unsafe { std::mem::transmute::<*const MethodRef, &MethodRef>(method_ref) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*method_ref.cast::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref [INFO] [stdout] = note: `#[warn(clippy::transmute_ptr_to_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2811:26 [INFO] [stdout] | [INFO] [stdout] 2811 | let layout = ZVM.as_ref().unwrap().layouts().get_layout(layout_id); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2813:23 [INFO] [stdout] | [INFO] [stdout] 2813 | let obj = ZVM.as_ref().unwrap().obj_alloc(struct_layout).expect("TODO: alloc succeeds"); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2826:30 [INFO] [stdout] | [INFO] [stdout] 2826 | let field = unsafe { crate::compiler::ZVM.as_ref().unwrap().layouts().get_field_in_layout( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2841:30 [INFO] [stdout] | [INFO] [stdout] 2841 | let field = unsafe { crate::compiler::ZVM.as_ref().unwrap().layouts().get_field_in_layout( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/compiler/mod.rs:1222:26 [INFO] [stdout] | [INFO] [stdout] 1222 | unsafe { res.offset(b as isize).write(0u8); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 1222 - unsafe { res.offset(b as isize).write(0u8); } [INFO] [stdout] 1222 + unsafe { res.add(b).write(0u8); } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/compiler/mod.rs:1224:27 [INFO] [stdout] | [INFO] [stdout] 1224 | Some(unsafe { res.offset(StructLayout::header_size() as isize) }) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 1224 - Some(unsafe { res.offset(StructLayout::header_size() as isize) }) [INFO] [stdout] 1224 + Some(unsafe { res.add(StructLayout::header_size()) }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparing with null is better expressed by the `.is_null()` method [INFO] [stdout] --> src/compiler/mod.rs:1243:12 [INFO] [stdout] | [INFO] [stdout] 1243 | if ptr == std::ptr::null_mut() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr.is_null()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stdout] = note: `#[warn(clippy::cmp_null)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/compiler/mod.rs:1164:27 [INFO] [stdout] | [INFO] [stdout] 1164 | let vm = unsafe { ZVM.as_mut().unwrap() }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/compiler/mod.rs:1179:27 [INFO] [stdout] | [INFO] [stdout] 1179 | let vm = unsafe { ZVM.as_mut().unwrap() }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/compiler/mod.rs:1255:45 [INFO] [stdout] | [INFO] [stdout] 1255 | Ok(Self::runtime_alloc_func as usize) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(function_casts_as_integer)]` on by default [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 1255 | Ok(Self::runtime_alloc_func as *const () as usize) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/compiler/mod.rs:1258:41 [INFO] [stdout] | [INFO] [stdout] 1258 | Ok(Self::__vm_call_stub as usize) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 1258 | Ok(Self::__vm_call_stub as *const () as usize) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/compiler/mod.rs:1407:5 [INFO] [stdout] | [INFO] [stdout] 1407 | / rt_info.declare_layout({ [INFO] [stdout] 1408 | | let mut layout = ir::Layout::new(); [INFO] [stdout] 1409 | | layout.add_field(ir::LayoutFieldRef { [INFO] [stdout] 1410 | | offset: 0, [INFO] [stdout] ... | [INFO] [stdout] 1419 | | layout [INFO] [stdout] 1420 | | }, "java/lang/Integer".to_string()); [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] 1407 | let _ = rt_info.declare_layout({ [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/compiler/mod.rs:1422:9 [INFO] [stdout] | [INFO] [stdout] 1422 | / rt_info.declare_layout({ [INFO] [stdout] 1423 | | let mut layout = ir::Layout::new(); [INFO] [stdout] 1424 | | let mut offset = 0; [INFO] [stdout] 1425 | | for f in cls.fields.iter() { [INFO] [stdout] ... | [INFO] [stdout] 1433 | | layout [INFO] [stdout] 1434 | | }, cls.this_class.to_string()); [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] 1422 | let _ = rt_info.declare_layout({ [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/compiler/mod.rs:1403:5 [INFO] [stdout] | [INFO] [stdout] 1403 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/compiler/mod.rs:1439:5 [INFO] [stdout] | [INFO] [stdout] 1439 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/compiler/mod.rs:1441:5 [INFO] [stdout] | [INFO] [stdout] 1441 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: transmute used without annotations [INFO] [stdout] --> src/compiler/mod.rs:1466:48 [INFO] [stdout] | [INFO] [stdout] 1466 | let res = jitcall(args, unsafe { std::mem::transmute(function.data().as_ptr()) }); [INFO] [stdout] | ^^^^^^^^^ help: consider adding missing annotations: `transmute::<*const u8, fn(i64, i64, i64, i64, i64, i64) -> i64>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations [INFO] [stdout] = note: `#[warn(clippy::missing_transmute_annotations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/compiler/mod.rs:1474:5 [INFO] [stdout] | [INFO] [stdout] 1474 | / for i in 0..args.len() { [INFO] [stdout] 1475 | | actual_args[i] = args[i]; [INFO] [stdout] 1476 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `actual_args[..args.len()].copy_from_slice(&args[..]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/class_file/validated/method.rs:38:22 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn iter_from(&self, offset: u32) -> MethodInstrIter { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 38 | pub fn iter_from(&self, offset: u32) -> MethodInstrIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` fn uses type `compiler::ir::LayoutId`, which is not FFI-safe [INFO] [stdout] --> src/virtual_machine.rs:2750:43 [INFO] [stdout] | [INFO] [stdout] 2750 | extern "C" fn zvm_layout_id(&self) -> crate::compiler::ir::LayoutId { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe [INFO] [stdout] | [INFO] [stdout] = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct [INFO] [stdout] = note: this struct has unspecified layout [INFO] [stdout] note: the type is defined here [INFO] [stdout] --> src/compiler/mod.rs:164:5 [INFO] [stdout] | [INFO] [stdout] 164 | pub struct LayoutId(pub usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(improper_ctypes_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` fn uses type `std::sync::Arc`, which is not FFI-safe [INFO] [stdout] --> src/virtual_machine.rs:2759:40 [INFO] [stdout] | [INFO] [stdout] 2759 | extern "C" fn zvm_vtable(&self) -> Arc { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ not FFI-safe [INFO] [stdout] | [INFO] [stdout] = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct [INFO] [stdout] = note: this struct has unspecified layout [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2810:29 [INFO] [stdout] | [INFO] [stdout] 2810 | ... let layout_id = ZVM.as_ref().unwrap().layouts().get_layout_id(panic!("&class_file.this_name")).expect("TODO: class exists"); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2811:26 [INFO] [stdout] | [INFO] [stdout] 2811 | let layout = ZVM.as_ref().unwrap().layouts().get_layout(layout_id); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2813:23 [INFO] [stdout] | [INFO] [stdout] 2813 | let obj = ZVM.as_ref().unwrap().obj_alloc(struct_layout).expect("TODO: alloc succeeds"); [INFO] [stdout] | ^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2826:30 [INFO] [stdout] | [INFO] [stdout] 2826 | let field = unsafe { crate::compiler::ZVM.as_ref().unwrap().layouts().get_field_in_layout( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/virtual_machine.rs:2841:30 [INFO] [stdout] | [INFO] [stdout] 2841 | let field = unsafe { crate::compiler::ZVM.as_ref().unwrap().layouts().get_field_in_layout( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/compiler/mod.rs:1164:27 [INFO] [stdout] | [INFO] [stdout] 1164 | let vm = unsafe { ZVM.as_mut().unwrap() }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/compiler/mod.rs:1179:27 [INFO] [stdout] | [INFO] [stdout] 1179 | let vm = unsafe { ZVM.as_mut().unwrap() }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/compiler/mod.rs:1255:45 [INFO] [stdout] | [INFO] [stdout] 1255 | Ok(Self::runtime_alloc_func as usize) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(function_casts_as_integer)]` on by default [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 1255 | Ok(Self::runtime_alloc_func as *const () as usize) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/compiler/mod.rs:1258:41 [INFO] [stdout] | [INFO] [stdout] 1258 | Ok(Self::__vm_call_stub as usize) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 1258 | Ok(Self::__vm_call_stub as *const () as usize) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/compiler/mod.rs:1407:5 [INFO] [stdout] | [INFO] [stdout] 1407 | / rt_info.declare_layout({ [INFO] [stdout] 1408 | | let mut layout = ir::Layout::new(); [INFO] [stdout] 1409 | | layout.add_field(ir::LayoutFieldRef { [INFO] [stdout] 1410 | | offset: 0, [INFO] [stdout] ... | [INFO] [stdout] 1419 | | layout [INFO] [stdout] 1420 | | }, "java/lang/Integer".to_string()); [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] 1407 | let _ = rt_info.declare_layout({ [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/compiler/mod.rs:1422:9 [INFO] [stdout] | [INFO] [stdout] 1422 | / rt_info.declare_layout({ [INFO] [stdout] 1423 | | let mut layout = ir::Layout::new(); [INFO] [stdout] 1424 | | let mut offset = 0; [INFO] [stdout] 1425 | | for f in cls.fields.iter() { [INFO] [stdout] ... | [INFO] [stdout] 1433 | | layout [INFO] [stdout] 1434 | | }, cls.this_class.to_string()); [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] 1422 | let _ = rt_info.declare_layout({ [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking zvm-stdlib v0.1.0 (/opt/rustwide/workdir/zvm-stdlib) [INFO] [stderr] Checking zvm-cli v0.1.0 (/opt/rustwide/workdir/zvm-cli) [INFO] [stderr] Checking zvm-tools v0.1.0 (/opt/rustwide/workdir/zvm-tools) [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> zvm-tools/src/class_info.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> zvm-tools/src/class_info.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 25.17s [INFO] running `Command { std: "docker" "inspect" "00622427def0115c81f87c054a1ee6d8bc1c266f2d4c7843c2ff06b78d5b10f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "00622427def0115c81f87c054a1ee6d8bc1c266f2d4c7843c2ff06b78d5b10f0", kill_on_drop: false }` [INFO] [stdout] 00622427def0115c81f87c054a1ee6d8bc1c266f2d4c7843c2ff06b78d5b10f0