[INFO] cloning repository https://github.com/jonathanabennett/tictactoe [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jonathanabennett/tictactoe" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjonathanabennett%2Ftictactoe", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjonathanabennett%2Ftictactoe'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ff4404b082ccda292b1d2b8c3ad7e2a225d80e8f [INFO] testing jonathanabennett/tictactoe/ff4404b082ccda292b1d2b8c3ad7e2a225d80e8f against master#9e297bf54d31eb3b30067208ff9af4416945a2ed for pr-125507 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjonathanabennett%2Ftictactoe" "/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/jonathanabennett/tictactoe on toolchain 9e297bf54d31eb3b30067208ff9af4416945a2ed [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9e297bf54d31eb3b30067208ff9af4416945a2ed" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/jonathanabennett/tictactoe [INFO] finished tweaking git repo https://github.com/jonathanabennett/tictactoe [INFO] tweaked toml for git repo https://github.com/jonathanabennett/tictactoe written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/jonathanabennett/tictactoe 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" "+9e297bf54d31eb3b30067208ff9af4416945a2ed" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:beeedbb442662e57d416641ecc3200b38e573c25b057896194468d05594dd835" "/opt/rustwide/cargo-home/bin/cargo" "+9e297bf54d31eb3b30067208ff9af4416945a2ed" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4451de7f2660ca518298858bfbe6f145895119deba749b0fb18d47d7150cfeeb [INFO] running `Command { std: "docker" "start" "-a" "4451de7f2660ca518298858bfbe6f145895119deba749b0fb18d47d7150cfeeb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4451de7f2660ca518298858bfbe6f145895119deba749b0fb18d47d7150cfeeb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4451de7f2660ca518298858bfbe6f145895119deba749b0fb18d47d7150cfeeb", kill_on_drop: false }` [INFO] [stdout] 4451de7f2660ca518298858bfbe6f145895119deba749b0fb18d47d7150cfeeb [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=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:beeedbb442662e57d416641ecc3200b38e573c25b057896194468d05594dd835" "/opt/rustwide/cargo-home/bin/cargo" "+9e297bf54d31eb3b30067208ff9af4416945a2ed" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1474fdee1814d1fdc65c613b83e07deceeb72d9730ecd3fa88c6c9a5d95bef44 [INFO] running `Command { std: "docker" "start" "-a" "1474fdee1814d1fdc65c613b83e07deceeb72d9730ecd3fa88c6c9a5d95bef44", kill_on_drop: false }` [INFO] [stderr] Compiling tictactoe v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0382]: borrow of moved value: `cells` [INFO] [stdout] --> src/main.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 23 | let mut cells: [CellType; 9] = [CellType::Empty(0), CellType::Empty(1), CellType::Empty(2), [INFO] [stdout] | --------- move occurs because `cells` has type `[CellType; 9]`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 29 | while let CellType::Empty(_) = victor { [INFO] [stdout] | ------------------------------------- inside of this loop [INFO] [stdout] 30 | print_board(&cells); [INFO] [stdout] | ^^^^^^ value borrowed here after move [INFO] [stdout] ... [INFO] [stdout] 35 | victor = check_victory(cells); [INFO] [stdout] | ----- value moved here, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in function `check_victory` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> src/main.rs:83:25 [INFO] [stdout] | [INFO] [stdout] 83 | fn check_victory(cells: [CellType; 9]) -> CellType { [INFO] [stdout] | ------------- ^^^^^^^^^^^^^ this parameter takes ownership of the value [INFO] [stdout] | | [INFO] [stdout] | in this function [INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once [INFO] [stdout] | [INFO] [stdout] 29 ~ let mut value = check_victory(cells); [INFO] [stdout] 30 ~ while let CellType::Empty(_) = victor { [INFO] [stdout] 31 | print_board(&cells); [INFO] [stdout] ... [INFO] [stdout] 35 | print_board(&cells); [INFO] [stdout] 36 ~ victor = value; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `player` [INFO] [stdout] --> src/main.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 26 | let mut player = CellType::Player1; [INFO] [stdout] | ---------- move occurs because `player` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 29 | while let CellType::Empty(_) = victor { [INFO] [stdout] | ------------------------------------- inside of this loop [INFO] [stdout] ... [INFO] [stdout] 32 | change_cell(&mut cells, player); [INFO] [stdout] | ------ value moved here [INFO] [stdout] ... [INFO] [stdout] 36 | if player == CellType::Player1 { [INFO] [stdout] | ^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in function `change_cell` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> src/main.rs:56:51 [INFO] [stdout] | [INFO] [stdout] 56 | fn change_cell(cells: &mut [CellType; 9], player: CellType) { [INFO] [stdout] | ----------- in this function ^^^^^^^^ this parameter takes ownership of the value [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 32 | change_cell(&mut cells, player); [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once [INFO] [stdout] | [INFO] [stdout] 29 ~ let mut value = change_cell(&mut cells, player); [INFO] [stdout] 30 ~ while let CellType::Empty(_) = victor { [INFO] [stdout] 31 | print_board(&cells); [INFO] [stdout] 32 | [INFO] [stdout] 33 ~ value; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `output` [INFO] [stdout] --> src/main.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | let mut output: [char; 9]; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_output` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cell` [INFO] [stdout] --> src/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | for cell in cells { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_cell` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `player` [INFO] [stdout] --> src/main.rs:72:31 [INFO] [stdout] | [INFO] [stdout] 56 | fn change_cell(cells: &mut [CellType; 9], player: CellType) { [INFO] [stdout] | ------ move occurs because `player` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 59 | while exit == 0 { [INFO] [stdout] | --------------- inside of this loop [INFO] [stdout] ... [INFO] [stdout] 72 | cells[cell] = player; [INFO] [stdout] | ^^^^^^ value moved here, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 72 | cells[cell] = player; [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | cells[0] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 85 | cells[0] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | cells[0] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 87 | cells[0] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | cells[0] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 89 | cells[0] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | cells[1] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 91 | cells[1] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | cells[2] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 93 | cells[2] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | cells[3] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 95 | cells[3] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 97 | cells[6] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 97 | cells[6] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0508]: cannot move out of type `[CellType; 9]`, a non-copy array [INFO] [stdout] --> src/main.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | cells[8] [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | cannot move out of here [INFO] [stdout] | move occurs because `cells[_]` has type `CellType`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `CellType` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/main.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | enum CellType { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 99 | cells[8] [INFO] [stdout] | -------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 11 previous errors; 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0382, E0508. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `tictactoe` (bin "tictactoe") due to 12 previous errors; 2 warnings emitted [INFO] running `Command { std: "docker" "inspect" "1474fdee1814d1fdc65c613b83e07deceeb72d9730ecd3fa88c6c9a5d95bef44", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1474fdee1814d1fdc65c613b83e07deceeb72d9730ecd3fa88c6c9a5d95bef44", kill_on_drop: false }` [INFO] [stdout] 1474fdee1814d1fdc65c613b83e07deceeb72d9730ecd3fa88c6c9a5d95bef44