[INFO] fetching crate ricochetrobots 0.0.0... [INFO] checking ricochetrobots-0.0.0 against master#506512391b1a75ae450d36c9420978402a91abcc for pr-125384 [INFO] extracting crate ricochetrobots 0.0.0 into /workspace/builds/worker-3-tc1/source [INFO] validating manifest of crates.io crate ricochetrobots 0.0.0 on toolchain 506512391b1a75ae450d36c9420978402a91abcc [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate ricochetrobots 0.0.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate ricochetrobots 0.0.0 [INFO] tweaked toml for crates.io crate ricochetrobots 0.0.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] crate crates.io crate ricochetrobots 0.0.0 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" "+506512391b1a75ae450d36c9420978402a91abcc" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1b2b338e71bbe5555965ca9c29f93de52fa15d60426e9f72a1fa82880935a763 [INFO] running `Command { std: "docker" "start" "-a" "1b2b338e71bbe5555965ca9c29f93de52fa15d60426e9f72a1fa82880935a763", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1b2b338e71bbe5555965ca9c29f93de52fa15d60426e9f72a1fa82880935a763", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1b2b338e71bbe5555965ca9c29f93de52fa15d60426e9f72a1fa82880935a763", kill_on_drop: false }` [INFO] [stdout] 1b2b338e71bbe5555965ca9c29f93de52fa15d60426e9f72a1fa82880935a763 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=allow" "-e" "RUSTDOCFLAGS=--cap-lints=allow" "-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:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+506512391b1a75ae450d36c9420978402a91abcc" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] fec8970d8a2ab32e05a7f6411d134f880f2208fae0b33daf9ef41477e2545b00 [INFO] running `Command { std: "docker" "start" "-a" "fec8970d8a2ab32e05a7f6411d134f880f2208fae0b33daf9ef41477e2545b00", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling syn v1.0.105 [INFO] [stderr] Compiling serde v1.0.152 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.87 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling serde_json v1.0.79 [INFO] [stderr] Checking ryu v1.0.9 [INFO] [stderr] Checking itoa v1.0.1 [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling bumpalo v3.9.1 [INFO] [stderr] Compiling once_cell v1.14.0 [INFO] [stderr] Checking anstyle-parse v0.2.1 [INFO] [stderr] Compiling wasm-bindgen v0.2.87 [INFO] [stderr] Checking anstyle v1.0.2 [INFO] [stderr] Checking clap_lex v0.5.1 [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Checking crossbeam-epoch v0.9.15 [INFO] [stderr] Compiling num-traits v0.2.16 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Compiling rustix v0.38.9 [INFO] [stderr] Checking anstream v0.5.0 [INFO] [stderr] Checking base64 v0.21.2 [INFO] [stderr] Checking bitflags v2.4.0 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Checking clap_builder v4.4.0 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Checking linux-raw-sys v0.4.5 [INFO] [stderr] Compiling syn v2.0.29 [INFO] [stderr] Checking regex-syntax v0.7.5 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking rayon-core v1.11.0 [INFO] [stderr] Checking plotters v0.3.5 [INFO] [stderr] Checking rayon v1.7.0 [INFO] [stderr] Checking is-terminal v0.4.9 [INFO] [stderr] Checking regex-automata v0.3.7 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Compiling serde_derive v1.0.152 [INFO] [stderr] Checking regex v1.9.4 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.87 [INFO] [stderr] Compiling clap_derive v4.4.0 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.87 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.87 [INFO] [stderr] Checking clap v4.4.0 [INFO] [stderr] Checking ciborium v0.2.1 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking js-sys v0.3.64 [INFO] [stderr] Checking serde-wasm-bindgen v0.5.0 [INFO] [stderr] Checking ricochetrobots v0.0.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.17s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.87 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 5` [INFO] running `Command { std: "docker" "inspect" "fec8970d8a2ab32e05a7f6411d134f880f2208fae0b33daf9ef41477e2545b00", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fec8970d8a2ab32e05a7f6411d134f880f2208fae0b33daf9ef41477e2545b00", kill_on_drop: false }` [INFO] [stdout] fec8970d8a2ab32e05a7f6411d134f880f2208fae0b33daf9ef41477e2545b00 [INFO] checking ricochetrobots-0.0.0 against try#dae34b759e282c069aa28752564694effd121a63 for pr-125384 [INFO] extracting crate ricochetrobots 0.0.0 into /workspace/builds/worker-3-tc2/source [INFO] validating manifest of crates.io crate ricochetrobots 0.0.0 on toolchain dae34b759e282c069aa28752564694effd121a63 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate ricochetrobots 0.0.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate ricochetrobots 0.0.0 [INFO] tweaked toml for crates.io crate ricochetrobots 0.0.0 written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] crate crates.io crate ricochetrobots 0.0.0 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" "+dae34b759e282c069aa28752564694effd121a63" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 11f3742830125c00aca244be26b65f03d5570c7e275d2501d54a0d19c34637d5 [INFO] running `Command { std: "docker" "start" "-a" "11f3742830125c00aca244be26b65f03d5570c7e275d2501d54a0d19c34637d5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "11f3742830125c00aca244be26b65f03d5570c7e275d2501d54a0d19c34637d5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "11f3742830125c00aca244be26b65f03d5570c7e275d2501d54a0d19c34637d5", kill_on_drop: false }` [INFO] [stdout] 11f3742830125c00aca244be26b65f03d5570c7e275d2501d54a0d19c34637d5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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=allow" "-e" "RUSTDOCFLAGS=--cap-lints=allow" "-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:59a85a07ab18ca8720692f8e61effa1c651d9e2ca591e072c2b212bb91a6b8b5" "/opt/rustwide/cargo-home/bin/cargo" "+dae34b759e282c069aa28752564694effd121a63" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 436cd4c5588fd53b02bdedcc7e3f39142027a5dfd2b38769a5f88993c0135b17 [INFO] running `Command { std: "docker" "start" "-a" "436cd4c5588fd53b02bdedcc7e3f39142027a5dfd2b38769a5f88993c0135b17", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Migrating Cargo.toml from 2021 edition to 2024 [INFO] [stderr] Compiling proc-macro2 v1.0.66 [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling syn v1.0.105 [INFO] [stderr] Compiling serde v1.0.152 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.87 [INFO] [stderr] Compiling serde_json v1.0.79 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling once_cell v1.14.0 [INFO] [stderr] Checking ryu v1.0.9 [INFO] [stderr] Checking itoa v1.0.1 [INFO] [stderr] Compiling bumpalo v3.9.1 [INFO] [stderr] Checking anstyle-parse v0.2.1 [INFO] [stderr] Checking anstyle v1.0.2 [INFO] [stderr] Compiling wasm-bindgen v0.2.87 [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Checking clap_lex v0.5.1 [INFO] [stderr] Checking crossbeam-epoch v0.9.15 [INFO] [stderr] Checking anstream v0.5.0 [INFO] [stderr] Compiling num-traits v0.2.16 [INFO] [stderr] Checking either v1.9.0 [INFO] [stderr] Compiling rustix v0.38.9 [INFO] [stderr] Checking regex-syntax v0.7.5 [INFO] [stderr] Checking bitflags v2.4.0 [INFO] [stderr] Checking clap_builder v4.4.0 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Checking linux-raw-sys v0.4.5 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Checking base64 v0.21.2 [INFO] [stderr] Compiling syn v2.0.29 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking rayon-core v1.11.0 [INFO] [stderr] Checking regex-automata v0.3.7 [INFO] [stderr] Checking rayon v1.7.0 [INFO] [stderr] Checking is-terminal v0.4.9 [INFO] [stderr] Checking difference v2.0.0 [INFO] [stderr] Checking plotters v0.3.5 [INFO] [stderr] Checking criterion-plot v0.5.0 [INFO] [stderr] Checking regex v1.9.4 [INFO] [stderr] Compiling serde_derive v1.0.152 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.87 [INFO] [stderr] Compiling clap_derive v4.4.0 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.87 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.87 [INFO] [stderr] Checking clap v4.4.0 [INFO] [stderr] Checking ciborium v0.2.1 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking criterion v0.5.1 [INFO] [stderr] Checking js-sys v0.3.64 [INFO] [stderr] Checking serde-wasm-bindgen v0.5.0 [INFO] [stderr] Checking ricochetrobots v0.0.0 (/tmp/fixit) [INFO] [stderr] Migrating src/lib.rs from 2021 edition to 2024 [INFO] [stderr] Migrating src/bin/solve.rs from 2021 edition to 2024 [INFO] [stderr] Migrating src/bin/ricochetrobots-debug-precompute.rs from 2021 edition to 2024 [INFO] [stderr] Migrating benches/quick.rs from 2021 edition to 2024 [INFO] [stderr] Migrating tests/solutions.rs from 2021 edition to 2024 [INFO] [stderr] Migrating benches/solve.rs from 2021 edition to 2024 [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.62s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.87 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking ricochetrobots v0.0.0 (/tmp/fixit) [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:248:6 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 248 | game.set_robots(new_state); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:248:6 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 248 | game.set_robots(new_state); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:260:7 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 260 | game.set_robots(robots); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:260:7 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 260 | game.set_robots(robots); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `game` because it is borrowed [INFO] [stdout] --> src/solver.rs:265:34 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn solve(mut game: crate::Game) -> crate::Solution { [INFO] [stdout] | -------- binding `game` declared here [INFO] [stdout] ... [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | borrow of `game` occurs here [INFO] [stdout] | a temporary with access to the borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 265 | return crate::Solution::new(game, diffs, states, robot_map); [INFO] [stdout] | ^^^^ move out of `game` occurs here [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] | - ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.clone().moves_for(robot) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:268:5 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | immutable borrow later used here [INFO] [stdout] ... [INFO] [stdout] 268 | game.set_robot(robot, m); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:269:26 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | immutable borrow later used here [INFO] [stdout] ... [INFO] [stdout] 269 | let score = estimate(&mut game) as usize + history.depth() as usize; [INFO] [stdout] | ^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `game` because it is borrowed [INFO] [stdout] --> src/solver.rs:265:34 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn solve(mut game: crate::Game) -> crate::Solution { [INFO] [stdout] | -------- binding `game` declared here [INFO] [stdout] ... [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | borrow of `game` occurs here [INFO] [stdout] | a temporary with access to the borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 265 | return crate::Solution::new(game, diffs, states, robot_map); [INFO] [stdout] | ^^^^ move out of `game` occurs here [INFO] [stdout] ... [INFO] [stdout] 271 | } [INFO] [stdout] | - ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.clone().moves_for(robot) { [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:268:5 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | immutable borrow later used here [INFO] [stdout] ... [INFO] [stdout] 268 | game.set_robot(robot, m); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:269:26 [INFO] [stdout] | [INFO] [stdout] 234 | for m in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | immutable borrow later used here [INFO] [stdout] ... [INFO] [stdout] 269 | let score = estimate(&mut game) as usize + history.depth() as usize; [INFO] [stdout] | ^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:174:5 [INFO] [stdout] | [INFO] [stdout] 165 | for new_pos in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 174 | game.set_robot(robot, new_pos); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 178 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:175:8 [INFO] [stdout] | [INFO] [stdout] 165 | for new_pos in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 175 | if search_path(game, precompute, next_score, robot) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 178 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:174:5 [INFO] [stdout] | [INFO] [stdout] 165 | for new_pos in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 174 | game.set_robot(robot, new_pos); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 178 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `*game` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/solver.rs:175:8 [INFO] [stdout] | [INFO] [stdout] 165 | for new_pos in game.moves_for(robot) { [INFO] [stdout] | --------------------- [INFO] [stdout] | | [INFO] [stdout] | immutable borrow occurs here [INFO] [stdout] | a temporary with access to the immutable borrow is created here ... [INFO] [stdout] ... [INFO] [stdout] 175 | if search_path(game, precompute, next_score, robot) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 178 | } [INFO] [stdout] | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0502, E0505. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0502`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0502, E0505. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0502`. [INFO] [stdout] [INFO] [stderr] error: could not compile `ricochetrobots` (lib) due to 8 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `ricochetrobots` (lib test) due to 8 previous errors [INFO] [stderr] error: failed to check after updating to 2024 [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `cargo check --frozen --all --all-targets --message-format=json` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "436cd4c5588fd53b02bdedcc7e3f39142027a5dfd2b38769a5f88993c0135b17", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "436cd4c5588fd53b02bdedcc7e3f39142027a5dfd2b38769a5f88993c0135b17", kill_on_drop: false }` [INFO] [stdout] 436cd4c5588fd53b02bdedcc7e3f39142027a5dfd2b38769a5f88993c0135b17