[INFO] cloning repository https://github.com/dasshiva/jvm-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/dasshiva/jvm-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdasshiva%2Fjvm-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdasshiva%2Fjvm-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 891242950fe7bc37849f13b1c87c9c380cd63ebc [INFO] checking dasshiva/jvm-rust against master#af4a5a13a15fa0c60e06321077ef452f769b42fd for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdasshiva%2Fjvm-rust" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/dasshiva/jvm-rust on toolchain af4a5a13a15fa0c60e06321077ef452f769b42fd [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/dasshiva/jvm-rust [INFO] finished tweaking git repo https://github.com/dasshiva/jvm-rust [INFO] tweaked toml for git repo https://github.com/dasshiva/jvm-rust written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/dasshiva/jvm-rust 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" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [ERROR] this task or one of its parent failed! [ERROR] no output for 300 seconds [ERROR] note: run with `RUST_BACKTRACE=1` to display a backtrace. [INFO] checking dasshiva/jvm-rust against try#36dbcaee1a55543dfc181be52a69d99ff46ff62f for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdasshiva%2Fjvm-rust" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/dasshiva/jvm-rust on toolchain 36dbcaee1a55543dfc181be52a69d99ff46ff62f [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/dasshiva/jvm-rust [INFO] finished tweaking git repo https://github.com/dasshiva/jvm-rust [INFO] tweaked toml for git repo https://github.com/dasshiva/jvm-rust written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/dasshiva/jvm-rust 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" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] checking dasshiva/jvm-rust against try#36dbcaee1a55543dfc181be52a69d99ff46ff62f for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fdasshiva%2Fjvm-rust" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/dasshiva/jvm-rust on toolchain 36dbcaee1a55543dfc181be52a69d99ff46ff62f [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/dasshiva/jvm-rust [INFO] finished tweaking git repo https://github.com/dasshiva/jvm-rust [INFO] tweaked toml for git repo https://github.com/dasshiva/jvm-rust written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/dasshiva/jvm-rust 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" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rand_core v0.6.4 [INFO] [stderr] Downloaded getrandom v0.2.8 [INFO] [stderr] Downloaded wasi v0.11.0+wasi-snapshot-preview1 [INFO] [stderr] Downloaded stable_deref_trait v1.2.0 [INFO] [stderr] Downloaded owning_ref v0.4.1 [INFO] [stderr] Downloaded ppv-lite86 v0.2.17 [INFO] [stderr] Downloaded log v0.4.17 [INFO] [stderr] Downloaded rand v0.8.5 [INFO] [stderr] Downloaded libc v0.2.139 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 31d3671f09195f2446854c115137b987d1d5e55865bca7a0b85fc69226b2f9b1 [INFO] running `Command { std: "docker" "start" "-a" "31d3671f09195f2446854c115137b987d1d5e55865bca7a0b85fc69226b2f9b1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "31d3671f09195f2446854c115137b987d1d5e55865bca7a0b85fc69226b2f9b1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "31d3671f09195f2446854c115137b987d1d5e55865bca7a0b85fc69226b2f9b1", kill_on_drop: false }` [INFO] [stdout] 31d3671f09195f2446854c115137b987d1d5e55865bca7a0b85fc69226b2f9b1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 85bc8adc9e98751ddadd0040754aa74cf96d71823fbee4baf73c249d2670ae24 [INFO] running `Command { std: "docker" "start" "-a" "85bc8adc9e98751ddadd0040754aa74cf96d71823fbee4baf73c249d2670ae24", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Compiling libc v0.2.139 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking owning_ref v0.4.1 [INFO] [stderr] Checking getrandom v0.2.8 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking jvm v0.1.0 (/tmp/fixit) [INFO] [stderr] Migrating src/main.rs from 2021 edition to 2024 [INFO] [stdout] error: expected expression, found keyword `mut` [INFO] [stdout] --> src/runtime/loader.rs:17:34 [INFO] [stdout] | [INFO] [stdout] 17 | Some(heap.new_class(Class::new(mut ClassFile::new(file))).as_obj().unwrap()) [INFO] [stdout] | ^^^ expected expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::classfile::attrs::Attrs` [INFO] [stdout] --> src/classfile/class.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::classfile::attrs::Attrs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::classfile::attrs::Code` [INFO] [stdout] --> src/classfile/mets.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::classfile::attrs::Code; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HeapRef`, `self` [INFO] [stdout] --> src/runtime/exec.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | use super::heap::{HeapRef, self, Heap}; [INFO] [stdout] | ^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::runtime::r#ref::Reference` [INFO] [stdout] --> src/runtime/frame.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::runtime::r#ref::Reference; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `owning_ref::OwningRef` [INFO] [stdout] --> src/runtime/ref.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use owning_ref::OwningRef; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lazy_static::lazy_static` [INFO] [stdout] --> src/runtime/loader.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use lazy_static::lazy_static; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `owning_ref::MutexGuardRef` [INFO] [stdout] --> src/runtime/loader.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use owning_ref::MutexGuardRef; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Mutex` [INFO] [stdout] --> src/runtime/loader.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::Mutex; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AtomicUsize`, `Ordering` [INFO] [stdout] --> src/runtime/loader.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | use std::sync::atomic::{AtomicUsize, Ordering}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `heap` [INFO] [stdout] --> src/runtime/loader.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | use super::{heap, class::Class}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::classfile::class::ClassFile` [INFO] [stdout] --> src/runtime/loader.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::classfile::class::ClassFile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `classfile::class::ClassFile` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use classfile::class::ClassFile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | #[macro_use] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/cpool.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for i in 0..size-1 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/cpool.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..length { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/attrs.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for i in 0..size { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/attrs.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | for i in 0..size { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/attrs.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | for i in 0..len { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pool` [INFO] [stdout] --> src/classfile/attrs.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn new(src: &mut Cursor>, pool: &CPool) -> Self { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pool` [INFO] [stdout] --> src/runtime/exec.rs:9:29 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn run(method: &Method, pool: &CPool, heap: &mut Heap) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `res` is never read [INFO] [stdout] --> src/runtime/exec.rs:125:23 [INFO] [stdout] | [INFO] [stdout] 125 | let mut res = false; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of index of `Vec` [INFO] [stdout] --> src/runtime/exec.rs:50:28 [INFO] [stdout] | [INFO] [stdout] 50 | let elem = frame.lvarray[delta as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `frame::Types`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 50 | let elem = &frame.lvarray[delta as usize]; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*heap` as mutable more than once at a time [INFO] [stdout] --> src/runtime/exec.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | 4 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] 157 | 5 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ---------------------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | argument requires that `*heap` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0521]: borrowed data escapes outside of function [INFO] [stdout] --> src/runtime/exec.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn real_exec(s: &Code, frame: &mut Frame, heap: &mut Heap) { [INFO] [stdout] | ---- - let's call the lifetime of this reference `'1` [INFO] [stdout] | | [INFO] [stdout] | `heap` is a reference that is only valid in the function body [INFO] [stdout] ... [INFO] [stdout] 156 | 4 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `heap` escapes the function body here [INFO] [stdout] | argument requires that `'1` must outlive `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*heap` as mutable more than once at a time [INFO] [stdout] --> src/runtime/exec.rs:157:50 [INFO] [stdout] | [INFO] [stdout] 157 | 5 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ^^^^------------------------------------------------ [INFO] [stdout] | | [INFO] [stdout] | `*heap` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | argument requires that `*heap` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ret` [INFO] [stdout] --> src/runtime/frame.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | let ret = &desc[end + 1..desc.len()]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ret` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/runtime/frame.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | for i in lvarray.len()..(method.code.locals as usize) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `heap` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:31:34 [INFO] [stdout] | [INFO] [stdout] 26 | let class = match loader::get_class_by_name("Hello.class", &mut heap) { [INFO] [stdout] | --------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 31 | exec::run(&main, &class.cpool, &mut heap); [INFO] [stdout] | --------- ^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 previous errors; 23 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0499, E0507, E0521. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0499`. [INFO] [stdout] [INFO] [stderr] error: could not compile `jvm` (bin "jvm" test) due to 7 previous errors; 23 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error: expected expression, found keyword `mut` [INFO] [stdout] --> src/runtime/loader.rs:17:34 [INFO] [stdout] | [INFO] [stdout] 17 | Some(heap.new_class(Class::new(mut ClassFile::new(file))).as_obj().unwrap()) [INFO] [stdout] | ^^^ expected expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::classfile::attrs::Attrs` [INFO] [stdout] --> src/classfile/class.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::classfile::attrs::Attrs; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::classfile::attrs::Code` [INFO] [stdout] --> src/classfile/mets.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::classfile::attrs::Code; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HeapRef`, `self` [INFO] [stdout] --> src/runtime/exec.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | use super::heap::{HeapRef, self, Heap}; [INFO] [stdout] | ^^^^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::runtime::r#ref::Reference` [INFO] [stdout] --> src/runtime/frame.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::runtime::r#ref::Reference; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `owning_ref::OwningRef` [INFO] [stdout] --> src/runtime/ref.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use owning_ref::OwningRef; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `lazy_static::lazy_static` [INFO] [stdout] --> src/runtime/loader.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use lazy_static::lazy_static; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `owning_ref::MutexGuardRef` [INFO] [stdout] --> src/runtime/loader.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use owning_ref::MutexGuardRef; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Mutex` [INFO] [stdout] --> src/runtime/loader.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::Mutex; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AtomicUsize`, `Ordering` [INFO] [stdout] --> src/runtime/loader.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | use std::sync::atomic::{AtomicUsize, Ordering}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `heap` [INFO] [stdout] --> src/runtime/loader.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | use super::{heap, class::Class}; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::classfile::class::ClassFile` [INFO] [stdout] --> src/runtime/loader.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::classfile::class::ClassFile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `classfile::class::ClassFile` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use classfile::class::ClassFile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `#[macro_use]` import [INFO] [stdout] --> src/main.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | #[macro_use] [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/cpool.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for i in 0..size-1 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/cpool.rs:20:15 [INFO] [stdout] | [INFO] [stdout] 20 | for i in 0..length { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/attrs.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for i in 0..size { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/attrs.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | for i in 0..size { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/classfile/attrs.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | for i in 0..len { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pool` [INFO] [stdout] --> src/classfile/attrs.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | pub fn new(src: &mut Cursor>, pool: &CPool) -> Self { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pool` [INFO] [stdout] --> src/runtime/exec.rs:9:29 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn run(method: &Method, pool: &CPool, heap: &mut Heap) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_pool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `res` is never read [INFO] [stdout] --> src/runtime/exec.rs:125:23 [INFO] [stdout] | [INFO] [stdout] 125 | let mut res = false; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of index of `Vec` [INFO] [stdout] --> src/runtime/exec.rs:50:28 [INFO] [stdout] | [INFO] [stdout] 50 | let elem = frame.lvarray[delta as usize]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because value has type `frame::Types`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 50 | let elem = &frame.lvarray[delta as usize]; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*heap` as mutable more than once at a time [INFO] [stdout] --> src/runtime/exec.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 156 | 4 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ^^^^ second mutable borrow occurs here [INFO] [stdout] 157 | 5 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ---------------------------------------------------- [INFO] [stdout] | | [INFO] [stdout] | first mutable borrow occurs here [INFO] [stdout] | argument requires that `*heap` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0521]: borrowed data escapes outside of function [INFO] [stdout] --> src/runtime/exec.rs:156:50 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn real_exec(s: &Code, frame: &mut Frame, heap: &mut Heap) { [INFO] [stdout] | ---- - let's call the lifetime of this reference `'1` [INFO] [stdout] | | [INFO] [stdout] | `heap` is a reference that is only valid in the function body [INFO] [stdout] ... [INFO] [stdout] 156 | 4 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `heap` escapes the function body here [INFO] [stdout] | argument requires that `'1` must outlive `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*heap` as mutable more than once at a time [INFO] [stdout] --> src/runtime/exec.rs:157:50 [INFO] [stdout] | [INFO] [stdout] 157 | 5 => frame.stack.push(Types::Ref(heap.new_array(Array::prim_new::(size as u32)))), [INFO] [stdout] | ^^^^------------------------------------------------ [INFO] [stdout] | | [INFO] [stdout] | `*heap` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | argument requires that `*heap` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ret` [INFO] [stdout] --> src/runtime/frame.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | let ret = &desc[end + 1..desc.len()]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ret` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/runtime/frame.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | for i in lvarray.len()..(method.code.locals as usize) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `heap` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:31:34 [INFO] [stdout] | [INFO] [stdout] 26 | let class = match loader::get_class_by_name("Hello.class", &mut heap) { [INFO] [stdout] | --------- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 31 | exec::run(&main, &class.cpool, &mut heap); [INFO] [stdout] | --------- ^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow later used by call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 previous errors; 23 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0499, E0507, E0521. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0499`. [INFO] [stdout] [INFO] [stderr] error: could not compile `jvm` (bin "jvm") due to 7 previous errors; 23 warnings emitted [INFO] [stderr] error: failed to migrate to next edition [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `cargo fix --edition --allow-no-vcs --allow-dirty --frozen --all --all-targets --message-format=json` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "85bc8adc9e98751ddadd0040754aa74cf96d71823fbee4baf73c249d2670ae24", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "85bc8adc9e98751ddadd0040754aa74cf96d71823fbee4baf73c249d2670ae24", kill_on_drop: false }` [INFO] [stdout] 85bc8adc9e98751ddadd0040754aa74cf96d71823fbee4baf73c249d2670ae24