[INFO] cloning repository https://github.com/nickhrm/battle_snake [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nickhrm/battle_snake" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnickhrm%2Fbattle_snake", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnickhrm%2Fbattle_snake'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 90d94609ccd6f44f9a4a826e15c983f40583ef57 [INFO] testing nickhrm/battle_snake against try#b83b707f97d809763b7861afa7638871f3339a33 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnickhrm%2Fbattle_snake" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/nickhrm/battle_snake [INFO] finished tweaking git repo https://github.com/nickhrm/battle_snake [INFO] tweaked toml for git repo https://github.com/nickhrm/battle_snake written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/nickhrm/battle_snake on toolchain b83b707f97d809763b7861afa7638871f3339a33 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/nickhrm/battle_snake 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" "+b83b707f97d809763b7861afa7638871f3339a33" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] dba3e12b944f8e875b6d75612e5bcd500b61f936f8673d388e6cea3b24218ad3 [INFO] running `Command { std: "docker" "start" "-a" "dba3e12b944f8e875b6d75612e5bcd500b61f936f8673d388e6cea3b24218ad3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dba3e12b944f8e875b6d75612e5bcd500b61f936f8673d388e6cea3b24218ad3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dba3e12b944f8e875b6d75612e5bcd500b61f936f8673d388e6cea3b24218ad3", kill_on_drop: false }` [INFO] [stdout] dba3e12b944f8e875b6d75612e5bcd500b61f936f8673d388e6cea3b24218ad3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6d4107837925bc04be4c215a90a0a735ca8808495bfba9270973e3f1099fabe2 [INFO] running `Command { std: "docker" "start" "-a" "6d4107837925bc04be4c215a90a0a735ca8808495bfba9270973e3f1099fabe2", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.158 [INFO] [stderr] Compiling serde v1.0.208 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling futures-channel v0.3.30 [INFO] [stderr] Compiling http v0.2.12 [INFO] [stderr] Compiling tracing-core v0.1.32 [INFO] [stderr] Compiling uncased v0.9.10 [INFO] [stderr] Compiling time-macros v0.2.18 [INFO] [stderr] Compiling cookie v0.18.1 [INFO] [stderr] Compiling inlinable_string v0.1.15 [INFO] [stderr] Compiling ref-cast v1.0.23 [INFO] [stderr] Compiling futures-util v0.3.30 [INFO] [stderr] Compiling syn v2.0.75 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling winnow v0.6.18 [INFO] [stderr] Compiling semver v1.0.23 [INFO] [stderr] Compiling http-body v0.4.6 [INFO] [stderr] Compiling rustix v0.38.34 [INFO] [stderr] Compiling stable-pattern v0.1.0 [INFO] [stderr] Compiling multer v3.1.0 [INFO] [stderr] Compiling figment v0.10.19 [INFO] [stderr] Compiling time v0.3.36 [INFO] [stderr] Compiling serde_json v1.0.125 [INFO] [stderr] Compiling regex-syntax v0.8.4 [INFO] [stderr] Compiling state v0.6.0 [INFO] [stderr] Compiling thiserror v1.0.63 [INFO] [stderr] Compiling either v1.13.0 [INFO] [stderr] Compiling is-terminal v0.4.13 [INFO] [stderr] Compiling yansi v1.0.1 [INFO] [stderr] Compiling signal-hook-registry v1.4.2 [INFO] [stderr] Compiling socket2 v0.5.7 [INFO] [stderr] Compiling mio v1.0.2 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling regex-automata v0.4.7 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Compiling futures v0.3.30 [INFO] [stderr] Compiling rocket v0.5.1 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling unicode-xid v0.2.5 [INFO] [stderr] Compiling fastrand v2.1.0 [INFO] [stderr] Compiling parking_lot v0.12.3 [INFO] [stderr] Compiling tempfile v3.12.0 [INFO] [stderr] Compiling num_cpus v1.16.0 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling atomic v0.5.3 [INFO] [stderr] Compiling rustc-hash v2.0.0 [INFO] [stderr] Compiling binascii v0.1.4 [INFO] [stderr] Compiling integer-sqrt v0.1.5 [INFO] [stderr] Compiling proc-macro2-diagnostics v0.10.1 [INFO] [stderr] Compiling devise_core v0.4.1 [INFO] [stderr] Compiling serde_derive v1.0.208 [INFO] [stderr] Compiling tokio-macros v2.4.0 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling pear_codegen v0.2.9 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling ref-cast-impl v1.0.23 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Compiling tokio v1.39.3 [INFO] [stderr] Compiling devise_codegen v0.4.1 [INFO] [stderr] Compiling pear v0.2.9 [INFO] [stderr] Compiling zerocopy v0.7.35 [INFO] [stderr] Compiling tracing v0.1.40 [INFO] [stderr] Compiling devise v0.4.1 [INFO] [stderr] Compiling async-stream-impl v0.3.5 [INFO] [stderr] Compiling regex v1.10.6 [INFO] [stderr] Compiling ppv-lite86 v0.2.20 [INFO] [stderr] Compiling deprecate-until v0.1.1 [INFO] [stderr] Compiling async-stream v0.3.5 [INFO] [stderr] Compiling async-trait v0.1.81 [INFO] [stderr] Compiling env_logger v0.9.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling tokio-util v0.7.11 [INFO] [stderr] Compiling tokio-stream v0.1.15 [INFO] [stderr] Compiling indexmap v2.4.0 [INFO] [stderr] Compiling serde_spanned v0.6.7 [INFO] [stderr] Compiling toml_datetime v0.6.8 [INFO] [stderr] Compiling ubyte v0.10.4 [INFO] [stderr] Compiling h2 v0.3.26 [INFO] [stderr] Compiling toml_edit v0.22.20 [INFO] [stderr] Compiling pathfinding v4.10.0 [INFO] [stderr] Compiling toml v0.8.19 [INFO] [stderr] Compiling hyper v0.14.30 [INFO] [stderr] Compiling rocket_http v0.5.1 [INFO] [stderr] Compiling rocket_codegen v0.5.1 [INFO] [stderr] Compiling honey_badger v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `danger::danger_matrix` [INFO] [stdout] --> src/logic.rs:14:19 [INFO] [stdout] | [INFO] [stdout] 14 | coord::Coord, danger::danger_matrix, goal_planner::goal_planner, local_planner::local_planner, print::print_board [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/coord.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn successors(&self, board: &Board, danger_matrix: Vec<(Coord, u32)>) -> Vec<(Coord, u32)> { [INFO] [stdout] | ----------------- expected `Vec<(Coord, u32)>` because of return type [INFO] [stdout] ... [INFO] [stdout] 71 | all_moves.into_iter().map(|p| (p, danger_matrix.iter().find(|e| e.0 == p)).1) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Vec<(Coord, u32)>`, found `Map, {closure@...}>` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec<(Coord, u32)>` [INFO] [stdout] found struct `std::iter::Map, {closure@src/coord.rs:71:35: 71:38}>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `matrix`, a captured variable in an `FnMut` closure [INFO] [stdout] --> src/goal_planner.rs:17:37 [INFO] [stdout] | [INFO] [stdout] 10 | let matrix = danger_matrix(board, you); [INFO] [stdout] | ------ ------------------------- move occurs because `matrix` has type `Vec<(Coord, u32)>`, which does not implement the `Copy` trait [INFO] [stdout] | | [INFO] [stdout] | captured outer variable [INFO] [stdout] ... [INFO] [stdout] 17 | |p| p.successors(board, matrix), [INFO] [stdout] | --- ^^^^^^ `matrix` is moved here [INFO] [stdout] | | [INFO] [stdout] | captured by this `FnMut` closure [INFO] [stdout] | [INFO] [stdout] help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but `FnOnce` closures may consume them only once [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/pathfinding-4.10.0/src/directed/astar.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | FN: FnMut(&N) -> IN, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 17 | |p| p.successors(board, matrix.clone()), [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `matrix`, a captured variable in an `FnMut` closure [INFO] [stdout] --> src/goal_planner.rs:17:13 [INFO] [stdout] | [INFO] [stdout] 10 | let matrix = danger_matrix(board, you); [INFO] [stdout] | ------ ------------------------- move occurs because `matrix` has type `Vec<(Coord, u32)>`, which does not implement the `Copy` trait [INFO] [stdout] | | [INFO] [stdout] | captured outer variable [INFO] [stdout] ... [INFO] [stdout] 14 | let path_to_food: Option<(Vec, u32)> = sorted_food.iter().find_map(|food| { [INFO] [stdout] | ------ captured by this `FnMut` closure [INFO] [stdout] ... [INFO] [stdout] 17 | |p| p.successors(board, matrix), [INFO] [stdout] | ^^^ ------ variable moved due to use in closure [INFO] [stdout] | | [INFO] [stdout] | `matrix` is moved here [INFO] [stdout] | [INFO] [stdout] help: `Fn` and `FnMut` closures require captured values to be able to be consumed multiple times, but `FnOnce` closures may consume them only once [INFO] [stdout] --> /rustc/b83b707f97d809763b7861afa7638871f3339a33/library/core/src/iter/traits/iterator.rs:2910:12 [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 17 | |p| p.successors(board, matrix.clone()), [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `matrix` [INFO] [stdout] --> src/goal_planner.rs:31:51 [INFO] [stdout] | [INFO] [stdout] 10 | let matrix = danger_matrix(board, you); [INFO] [stdout] | ------ move occurs because `matrix` has type `Vec<(Coord, u32)>`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 14 | let path_to_food: Option<(Vec, u32)> = sorted_food.iter().find_map(|food| { [INFO] [stdout] | ------ value moved into closure here [INFO] [stdout] ... [INFO] [stdout] 17 | |p| p.successors(board, matrix), [INFO] [stdout] | ------ variable moved due to use in closure [INFO] [stdout] ... [INFO] [stdout] 31 | let path = you.head.successors(board, matrix); [INFO] [stdout] | ^^^^^^ value used here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in method `successors` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> src/coord.rs:33:60 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn successors(&self, board: &Board, danger_matrix: Vec<(Coord, u32)>) -> Vec<(Coord, u32)> { [INFO] [stdout] | ---------- in this method ^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 17 | |p| p.successors(board, matrix.clone()), [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0382, E0507. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `honey_badger` (bin "honey_badger") due to 4 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "6d4107837925bc04be4c215a90a0a735ca8808495bfba9270973e3f1099fabe2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6d4107837925bc04be4c215a90a0a735ca8808495bfba9270973e3f1099fabe2", kill_on_drop: false }` [INFO] [stdout] 6d4107837925bc04be4c215a90a0a735ca8808495bfba9270973e3f1099fabe2