[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 try#23ffd2897cbb44320ca18dfe4d05dbacb37d55e0 for pr-115950 [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 23ffd2897cbb44320ca18dfe4d05dbacb37d55e0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "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" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "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:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9539ddc651eacd083071131c3942ca0441c51e0a6bb4c4c39085a5ccd8187700 [INFO] running `Command { std: "docker" "start" "-a" "9539ddc651eacd083071131c3942ca0441c51e0a6bb4c4c39085a5ccd8187700", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9539ddc651eacd083071131c3942ca0441c51e0a6bb4c4c39085a5ccd8187700", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9539ddc651eacd083071131c3942ca0441c51e0a6bb4c4c39085a5ccd8187700", kill_on_drop: false }` [INFO] [stdout] 9539ddc651eacd083071131c3942ca0441c51e0a6bb4c4c39085a5ccd8187700 [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=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:4f8da3c744d2da974e54ce020a79f4ad54313e914ebeaab8fc086f07e8d8b066" "/opt/rustwide/cargo-home/bin/cargo" "+23ffd2897cbb44320ca18dfe4d05dbacb37d55e0" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6362ecc9df8e7109451b5a3ff968fc1249f9e4c17d7314daa398f10b749e89fa [INFO] running `Command { std: "docker" "start" "-a" "6362ecc9df8e7109451b5a3ff968fc1249f9e4c17d7314daa398f10b749e89fa", 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] [stdout] warning: unused import: `STARTPOS` [INFO] [stdout] --> src/main.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use game::board::{Board, STARTPOS, Move, PieceTypes}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `REALLY_BIG_NUMBER`, `REALLY_SMALL_NUMBER` [INFO] [stdout] --> src/main.rs:7:35 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::engine::search::{self, REALLY_BIG_NUMBER, REALLY_SMALL_NUMBER}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `SQUARES`, `parse_square` [INFO] [stdout] --> src/game/movegen.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::game::board::{parse_square, SQUARES}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `STARTPOS` [INFO] [stdout] --> src/main.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use game::board::{Board, STARTPOS, Move, PieceTypes}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `REALLY_BIG_NUMBER`, `REALLY_SMALL_NUMBER` [INFO] [stdout] --> src/main.rs:7:35 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::engine::search::{self, REALLY_BIG_NUMBER, REALLY_SMALL_NUMBER}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `SQUARES`, `parse_square` [INFO] [stdout] --> src/game/movegen.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::game::board::{parse_square, SQUARES}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [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[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[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[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[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: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[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[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[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[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[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[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: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/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: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[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[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.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] warning: variable does not need to be mutable [INFO] [stdout] --> src/engine/search.rs:138:59 [INFO] [stdout] | [INFO] [stdout] 138 | pub fn search_captures(board: &mut Board, mut alpha: f32, mut beta: f32) -> f32 { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [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] warning: variable does not need to be mutable [INFO] [stdout] --> src/engine/search.rs:138:59 [INFO] [stdout] | [INFO] [stdout] 138 | pub fn search_captures(board: &mut Board, mut alpha: f32, mut beta: f32) -> f32 { [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [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[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[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[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[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[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[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[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[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[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[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[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` 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: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[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; 4 warnings emitted [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: aborting due to 33 previous errors; 4 warnings emitted [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" test) due to 34 previous errors; 4 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `rustchess` (bin "rustchess") due to 34 previous errors; 4 warnings emitted [INFO] running `Command { std: "docker" "inspect" "6362ecc9df8e7109451b5a3ff968fc1249f9e4c17d7314daa398f10b749e89fa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6362ecc9df8e7109451b5a3ff968fc1249f9e4c17d7314daa398f10b749e89fa", kill_on_drop: false }` [INFO] [stdout] 6362ecc9df8e7109451b5a3ff968fc1249f9e4c17d7314daa398f10b749e89fa