[INFO] cloning repository https://github.com/1N4005/rustchess [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/1N4005/rustchess" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1N4005%2Frustchess", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1N4005%2Frustchess'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e22d4865e593fc0341e121396c8b95d92d64363a [INFO] checking 1N4005/rustchess against master#91c0823ee63e793d990bb9fed898dc95b5d6db51 for pr-125384-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1N4005%2Frustchess" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/1N4005/rustchess on toolchain 91c0823ee63e793d990bb9fed898dc95b5d6db51 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+91c0823ee63e793d990bb9fed898dc95b5d6db51" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/1N4005/rustchess [INFO] finished tweaking git repo https://github.com/1N4005/rustchess [INFO] tweaked toml for git repo https://github.com/1N4005/rustchess written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/1N4005/rustchess 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" "+91c0823ee63e793d990bb9fed898dc95b5d6db51" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded getrandom v0.2.9 [INFO] [stderr] Downloaded libc v0.2.142 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:dff56e7819e73ed36160586b3445e93eb0be776c16704aeeded9c3fb668b2384" "/opt/rustwide/cargo-home/bin/cargo" "+91c0823ee63e793d990bb9fed898dc95b5d6db51" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d7978449f3455c7a532c1bf4c08a55856aa4d5339f08061e024c265dfef842b0 [INFO] running `Command { std: "docker" "start" "-a" "d7978449f3455c7a532c1bf4c08a55856aa4d5339f08061e024c265dfef842b0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d7978449f3455c7a532c1bf4c08a55856aa4d5339f08061e024c265dfef842b0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d7978449f3455c7a532c1bf4c08a55856aa4d5339f08061e024c265dfef842b0", kill_on_drop: false }` [INFO] [stdout] d7978449f3455c7a532c1bf4c08a55856aa4d5339f08061e024c265dfef842b0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=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:dff56e7819e73ed36160586b3445e93eb0be776c16704aeeded9c3fb668b2384" "/opt/rustwide/cargo-home/bin/cargo" "+91c0823ee63e793d990bb9fed898dc95b5d6db51" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d21e3eb489d4c06f4578dc7008d5434f602dc104722a5a05d59a9bb85ad62fa6 [INFO] running `Command { std: "docker" "start" "-a" "d21e3eb489d4c06f4578dc7008d5434f602dc104722a5a05d59a9bb85ad62fa6", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.142 [INFO] [stderr] Checking getrandom v0.2.9 [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 rustchess v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.73s [INFO] running `Command { std: "docker" "inspect" "d21e3eb489d4c06f4578dc7008d5434f602dc104722a5a05d59a9bb85ad62fa6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d21e3eb489d4c06f4578dc7008d5434f602dc104722a5a05d59a9bb85ad62fa6", kill_on_drop: false }` [INFO] [stdout] d21e3eb489d4c06f4578dc7008d5434f602dc104722a5a05d59a9bb85ad62fa6 [INFO] checking 1N4005/rustchess against try#519d6e23a6cb73c4d0f295f71ad37db8e95c54ab for pr-125384-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F1N4005%2Frustchess" "/workspace/builds/worker-1-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/1N4005/rustchess on toolchain 519d6e23a6cb73c4d0f295f71ad37db8e95c54ab [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+519d6e23a6cb73c4d0f295f71ad37db8e95c54ab" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/1N4005/rustchess [INFO] finished tweaking git repo https://github.com/1N4005/rustchess [INFO] tweaked toml for git repo https://github.com/1N4005/rustchess written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/1N4005/rustchess 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" "+519d6e23a6cb73c4d0f295f71ad37db8e95c54ab" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:dff56e7819e73ed36160586b3445e93eb0be776c16704aeeded9c3fb668b2384" "/opt/rustwide/cargo-home/bin/cargo" "+519d6e23a6cb73c4d0f295f71ad37db8e95c54ab" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 50e326924b87d85db778d845d6b4f2266df8e221e25671ed62cdb1cbf4f2e119 [INFO] running `Command { std: "docker" "start" "-a" "50e326924b87d85db778d845d6b4f2266df8e221e25671ed62cdb1cbf4f2e119", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "50e326924b87d85db778d845d6b4f2266df8e221e25671ed62cdb1cbf4f2e119", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "50e326924b87d85db778d845d6b4f2266df8e221e25671ed62cdb1cbf4f2e119", kill_on_drop: false }` [INFO] [stdout] 50e326924b87d85db778d845d6b4f2266df8e221e25671ed62cdb1cbf4f2e119 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:dff56e7819e73ed36160586b3445e93eb0be776c16704aeeded9c3fb668b2384" "/opt/rustwide/cargo-home/bin/cargo" "+519d6e23a6cb73c4d0f295f71ad37db8e95c54ab" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4914144c777f0e198879a5442e7ba47b24e85730329664481103b9e9d5d3d196 [INFO] running `Command { std: "docker" "start" "-a" "4914144c777f0e198879a5442e7ba47b24e85730329664481103b9e9d5d3d196", 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 libc v0.2.142 [INFO] [stderr] Checking getrandom v0.2.9 [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 rustchess v0.1.0 (/tmp/fixit) [INFO] [stderr] Migrating src/main.rs from 2021 edition to 2024 [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.34s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking rustchess v0.1.0 (/tmp/fixit) [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] 102 | [INFO] [stdout] 103 | if board.wtomove { [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 104 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:104:30 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 104 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:110:13 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 110 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:110:30 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 110 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] 132 | if move_to != PieceTypes::Empty { [INFO] [stdout] 133 | if board.wtomove { [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 134 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:134:34 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 134 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 140 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:140:34 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 140 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 148 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 148 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] 102 | [INFO] [stdout] 103 | if board.wtomove { [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 104 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:104:30 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 104 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:110:13 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 110 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:110:30 [INFO] [stdout] | [INFO] [stdout] 101 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 110 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 118 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:133:16 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] 132 | if move_to != PieceTypes::Empty { [INFO] [stdout] 133 | if board.wtomove { [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 134 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:134:34 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 134 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:140:17 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 140 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:140:34 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 140 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.wtomove` because it is borrowed [INFO] [stdout] --> src/game/movegen.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `board.wtomove` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 148 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.wtomove` is assigned to here but it was already borrowed [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.wtomove` because it was mutably borrowed [INFO] [stdout] --> src/game/movegen.rs:148:26 [INFO] [stdout] | [INFO] [stdout] 131 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 148 | board.wtomove = !board.wtomove; [INFO] [stdout] | ^^^^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] 149 | undo(board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/game/perft.rs:18:42 [INFO] [stdout] | [INFO] [stdout] 17 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] 18 | let numpositions = go(depth - 1, board, depth_from_root + 1); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] 19 | count += numpositions; [INFO] [stdout] 20 | undo(board); [INFO] [stdout] | ---- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/game/perft.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 17 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 20 | undo(board); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 25 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 92 | board, [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 101 | undo(board); [INFO] [stdout] | ---- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 101 | undo(board); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board.hash` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/engine/search.rs:104:88 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 104 | println!("saving eval {} with line {:?} in position {:#066b}", beta, line, board.hash); [INFO] [stdout] | ^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board.transposition_table` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 105 | board.transposition_table.insert( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.hash` because it was mutably borrowed [INFO] [stdout] --> src/engine/search.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 106 | board.hash, [INFO] [stdout] | ^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:149:37 [INFO] [stdout] | [INFO] [stdout] 147 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] 148 | [INFO] [stdout] 149 | let eval = -search_captures(board, -beta, -alpha); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] 150 | [INFO] [stdout] 151 | undo(board); [INFO] [stdout] | ---- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:151:14 [INFO] [stdout] | [INFO] [stdout] 147 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 151 | undo(board); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 160 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/game/perft.rs:18:42 [INFO] [stdout] | [INFO] [stdout] 17 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] 18 | let numpositions = go(depth - 1, board, depth_from_root + 1); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] 19 | count += numpositions; [INFO] [stdout] 20 | undo(board); [INFO] [stdout] | ---- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/game/perft.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 17 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 20 | undo(board); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 25 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/main.rs:34:32 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 35 | undo(&mut board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 34 ~ let binding = Move::parse_from("e2e4"); [INFO] [stdout] 35 ~ let mut undo = board.push(&binding); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:35:10 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] 35 | undo(&mut board); [INFO] [stdout] | ^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0506]: cannot assign to `board.hash` because it is borrowed [INFO] [stdout] --> src/main.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ----- `board.hash` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 38 | board.hash = generate_hash(&board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.hash` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:38:36 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 38 | board.hash = generate_hash(&board); [INFO] [stdout] | ^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/main.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:59:28 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] 59 | println!("{}", board); [INFO] [stdout] | ^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board.hash` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] 59 | println!("{}", board); [INFO] [stdout] 60 | println!("{:#066b}", board.hash); [INFO] [stdout] | ^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:68:41 [INFO] [stdout] | [INFO] [stdout] 58 | ... undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 68 | ... println!("{}", absearch(16, &mut board, search::REALLY_SMALL_NUMBER * 10.0, search::REALLY_BIG_NUMBER * 10.0, &mut eval_result, 0, ... [INFO] [stdout] | ^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] 69 | ... let elapsed = start.elapsed(); [INFO] [stdout] 70 | ... undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- ^^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `eval_result.best_move` does not live long enough [INFO] [stdout] --> src/main.rs:70:31 [INFO] [stdout] | [INFO] [stdout] 64 | let mut eval_result = EvalResult{best_move: Move{from: 0, to: 0, promotion: PieceTypes::Empty}}; [INFO] [stdout] | --------------- binding `eval_result` declared here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough [INFO] [stdout] ... [INFO] [stdout] 75 | } [INFO] [stdout] | - `eval_result.best_move` dropped here while still borrowed [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: values in a scope are dropped in the opposite order they are defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:72:46 [INFO] [stdout] | [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] 71 | [INFO] [stdout] 72 | println!("{}finished in {:.2?}", board, elapsed); [INFO] [stdout] | ^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board.hash` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:73:34 [INFO] [stdout] | [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 73 | println!("{:#066b}", board.hash); [INFO] [stdout] | ^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 92 | board, [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 101 | undo(board); [INFO] [stdout] | ---- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 101 | undo(board); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board.hash` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/engine/search.rs:104:88 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 104 | println!("saving eval {} with line {:?} in position {:#066b}", beta, line, board.hash); [INFO] [stdout] | ^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board.transposition_table` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:105:13 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 105 | board.transposition_table.insert( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `board.hash` because it was mutably borrowed [INFO] [stdout] --> src/engine/search.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 88 | let undo = board.push(&m); [INFO] [stdout] | ----- `*board` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 106 | board.hash, [INFO] [stdout] | ^^^^^^^^^^ use of borrowed `*board` [INFO] [stdout] ... [INFO] [stdout] 124 | } [INFO] [stdout] | - borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:149:37 [INFO] [stdout] | [INFO] [stdout] 147 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] 148 | [INFO] [stdout] 149 | let eval = -search_captures(board, -beta, -alpha); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] 150 | [INFO] [stdout] 151 | undo(board); [INFO] [stdout] | ---- first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*board` as mutable more than once at a time [INFO] [stdout] --> src/engine/search.rs:151:14 [INFO] [stdout] | [INFO] [stdout] 147 | let undo = board.push(&m); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 151 | undo(board); [INFO] [stdout] | ^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 160 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 33 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0499, E0502, E0503, E0506, E0597, E0716. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0499`. [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/main.rs:34:32 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] 35 | undo(&mut board); [INFO] [stdout] | ---- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 34 ~ let binding = Move::parse_from("e2e4"); [INFO] [stdout] 35 ~ let mut undo = board.push(&binding); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rustchess` (bin "rustchess" test) due to 34 previous errors [INFO] [stdout] error[E0499]: cannot borrow `board` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:35:10 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] 35 | undo(&mut board); [INFO] [stdout] | ^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0506]: cannot assign to `board.hash` because it is borrowed [INFO] [stdout] --> src/main.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ----- `board.hash` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 38 | board.hash = generate_hash(&board); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `board.hash` is assigned to here but it was already borrowed [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:38:36 [INFO] [stdout] | [INFO] [stdout] 34 | let mut undo = board.push(&Move::parse_from("e2e4")); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 38 | board.hash = generate_hash(&board); [INFO] [stdout] | ^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/main.rs:58:32 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement [INFO] [stdout] | | [INFO] [stdout] | creates a temporary value which is freed while still in use [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: consider using a `let` binding to create a longer lived value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:59:28 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] 59 | println!("{}", board); [INFO] [stdout] | ^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board.hash` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:60:34 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] 59 | println!("{}", board); [INFO] [stdout] 60 | println!("{:#066b}", board.hash); [INFO] [stdout] | ^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:68:41 [INFO] [stdout] | [INFO] [stdout] 58 | ... undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 68 | ... println!("{}", absearch(16, &mut board, search::REALLY_SMALL_NUMBER * 10.0, search::REALLY_BIG_NUMBER * 10.0, &mut eval_result, 0, ... [INFO] [stdout] | ^^^^^^^^^^ second mutable borrow occurs here [INFO] [stdout] 69 | ... let elapsed = start.elapsed(); [INFO] [stdout] 70 | ... undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `board` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:70:20 [INFO] [stdout] | [INFO] [stdout] 58 | undo = board.push(&Move::parse_from(&*input.trim())); [INFO] [stdout] | ----- first mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ---- ^^^^^ second mutable borrow occurs here [INFO] [stdout] | | [INFO] [stdout] | first borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `eval_result.best_move` does not live long enough [INFO] [stdout] --> src/main.rs:70:31 [INFO] [stdout] | [INFO] [stdout] 64 | let mut eval_result = EvalResult{best_move: Move{from: 0, to: 0, promotion: PieceTypes::Empty}}; [INFO] [stdout] | --------------- binding `eval_result` declared here [INFO] [stdout] ... [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough [INFO] [stdout] ... [INFO] [stdout] 75 | } [INFO] [stdout] | - `eval_result.best_move` dropped here while still borrowed [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: values in a scope are dropped in the opposite order they are defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:72:46 [INFO] [stdout] | [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] 71 | [INFO] [stdout] 72 | println!("{}finished in {:.2?}", board, elapsed); [INFO] [stdout] | ^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `board.hash` as immutable because it is also borrowed as mutable [INFO] [stdout] --> src/main.rs:73:34 [INFO] [stdout] | [INFO] [stdout] 70 | undo = board.push(&eval_result.best_move); [INFO] [stdout] | ----- mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 73 | println!("{:#066b}", board.hash); [INFO] [stdout] | ^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 78 | } [INFO] [stdout] | - mutable borrow might be used here, when `undo` is dropped and runs the destructor for type `impl for<'a> Fn(&'a mut Board)` [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 33 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0499, E0502, E0503, E0506, E0597, E0716. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0499`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rustchess` (bin "rustchess") due to 34 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" "4914144c777f0e198879a5442e7ba47b24e85730329664481103b9e9d5d3d196", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4914144c777f0e198879a5442e7ba47b24e85730329664481103b9e9d5d3d196", kill_on_drop: false }` [INFO] [stdout] 4914144c777f0e198879a5442e7ba47b24e85730329664481103b9e9d5d3d196