[INFO] cloning repository https://github.com/Atla004/snake_game
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Atla004/snake_game" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAtla004%2Fsnake_game", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAtla004%2Fsnake_game'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] c02707a8cefe11ab605d6a48d94af500885f1dfb
[INFO] checking Atla004/snake_game against try#f77b5bc6c7c84df104f86b0dd01d9490e3923fa8 for pr-147834
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAtla004%2Fsnake_game" "/workspace/builds/worker-0-tc2/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc2/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/Atla004/snake_game
[INFO] finished tweaking git repo https://github.com/Atla004/snake_game
[INFO] tweaked toml for git repo https://github.com/Atla004/snake_game written to /workspace/builds/worker-0-tc2/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/Atla004/snake_game on toolchain f77b5bc6c7c84df104f86b0dd01d9490e3923fa8
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f77b5bc6c7c84df104f86b0dd01d9490e3923fa8" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/Atla004/snake_game 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" "+f77b5bc6c7c84df104f86b0dd01d9490e3923fa8" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+f77b5bc6c7c84df104f86b0dd01d9490e3923fa8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] b9879a12e2a50988ccbd12d29aa99b712efe222d4f2a343718ee1727ef4b62a7
[INFO] running `Command { std: "docker" "start" "-a" "b9879a12e2a50988ccbd12d29aa99b712efe222d4f2a343718ee1727ef4b62a7", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "b9879a12e2a50988ccbd12d29aa99b712efe222d4f2a343718ee1727ef4b62a7", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "b9879a12e2a50988ccbd12d29aa99b712efe222d4f2a343718ee1727ef4b62a7", kill_on_drop: false }`
[INFO] [stdout] b9879a12e2a50988ccbd12d29aa99b712efe222d4f2a343718ee1727ef4b62a7
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+f77b5bc6c7c84df104f86b0dd01d9490e3923fa8" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] ab47d9bfbb9a6d5b689354cfcae68aca00a132dc77938e9d7e76b46e0aba2779
[INFO] running `Command { std: "docker" "start" "-a" "ab47d9bfbb9a6d5b689354cfcae68aca00a132dc77938e9d7e76b46e0aba2779", kill_on_drop: false }`
[INFO] [stderr]    Compiling proc-macro2 v1.0.93
[INFO] [stderr]    Compiling unicode-ident v1.0.15
[INFO] [stderr]    Compiling signal-hook v0.3.17
[INFO] [stderr]    Compiling x11 v2.21.0
[INFO] [stderr]     Checking signal-hook-registry v1.4.2
[INFO] [stderr]     Checking getrandom v0.2.15
[INFO] [stderr]     Checking log v0.4.25
[INFO] [stderr]    Compiling rustix v0.38.44
[INFO] [stderr]     Checking parking_lot_core v0.9.10
[INFO] [stderr]     Checking mio v1.0.3
[INFO] [stderr]     Checking bitflags v2.8.0
[INFO] [stderr]     Checking rand_core v0.6.4
[INFO] [stderr]     Checking linux-raw-sys v0.4.15
[INFO] [stderr]     Checking parking_lot v0.12.3
[INFO] [stderr]     Checking signal-hook-mio v0.2.4
[INFO] [stderr]    Compiling quote v1.0.38
[INFO] [stderr]    Compiling syn v2.0.96
[INFO] [stderr]     Checking rdev v0.5.3
[INFO] [stderr]     Checking crossterm v0.28.1
[INFO] [stderr]    Compiling zerocopy-derive v0.7.35
[INFO] [stderr]     Checking zerocopy v0.7.35
[INFO] [stderr]     Checking ppv-lite86 v0.2.20
[INFO] [stderr]     Checking rand_chacha v0.3.1
[INFO] [stderr]     Checking rand v0.8.5
[INFO] [stderr]     Checking snake_game v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] warning: unused imports: `Event`, `KeyCode`, and `self`
[INFO] [stdout]  --> src/main.rs:5:13
[INFO] [stdout]   |
[INFO] [stdout] 5 |     event::{self, Event, KeyCode},
[INFO] [stdout]   |             ^^^^  ^^^^^  ^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:174:21
[INFO] [stdout]     |
[INFO] [stdout] 174 |                     snake.change_direction(Direction::Up);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:178:21
[INFO] [stdout]     |
[INFO] [stdout] 178 |                     snake.change_direction(Direction::Down);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:182:21
[INFO] [stdout]     |
[INFO] [stdout] 182 |                     snake.change_direction(Direction::Right);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:186:21
[INFO] [stdout]     |
[INFO] [stdout] 186 |                     snake.change_direction(Direction::Left);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `snake`
[INFO] [stdout]    --> src/main.rs:210:29
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let snake = Snake::new();
[INFO] [stdout]     |         ----- move occurs because `snake` has type `Snake`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 167 |     thread::spawn(move || {
[INFO] [stdout]     |                   ------- value moved into closure here
[INFO] [stdout] ...
[INFO] [stdout] 174 |                     snake.change_direction(Direction::Up);
[INFO] [stdout]     |                     ----- variable moved due to use in closure
[INFO] [stdout] ...
[INFO] [stdout] 210 |     game_logic(&mut stdout, &mut snake, &mut food);  
[INFO] [stdout]     |                             ^^^^^^^^^^ value borrowed here after move
[INFO] [stdout]     |
[INFO] [stdout] note: if `Snake` implemented `Clone`, you could clone the value
[INFO] [stdout]    --> src/main.rs:23:1
[INFO] [stdout]     |
[INFO] [stdout]  23 | struct Snake {
[INFO] [stdout]     | ^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout] ...
[INFO] [stdout] 174 |                     snake.change_direction(Direction::Up);
[INFO] [stdout]     |                     ----- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:210:29
[INFO] [stdout]     |
[INFO] [stdout] 210 |     game_logic(&mut stdout, &mut snake, &mut food);  
[INFO] [stdout]     |                             ^^^^^^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `snake_game` (bin "snake_game") due to 6 previous errors; 1 warning emitted
[INFO] [stdout] Some errors have detailed explanations: E0382, E0596.
[INFO] [stdout] 
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] For more information about an error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stdout] warning: unused imports: `Event`, `KeyCode`, and `self`
[INFO] [stdout]  --> src/main.rs:5:13
[INFO] [stdout]   |
[INFO] [stdout] 5 |     event::{self, Event, KeyCode},
[INFO] [stdout]   |             ^^^^  ^^^^^  ^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:174:21
[INFO] [stdout]     |
[INFO] [stdout] 174 |                     snake.change_direction(Direction::Up);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:178:21
[INFO] [stdout]     |
[INFO] [stdout] 178 |                     snake.change_direction(Direction::Down);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:182:21
[INFO] [stdout]     |
[INFO] [stdout] 182 |                     snake.change_direction(Direction::Right);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:186:21
[INFO] [stdout]     |
[INFO] [stdout] 186 |                     snake.change_direction(Direction::Left);
[INFO] [stdout]     |                     ^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `snake`
[INFO] [stdout]    --> src/main.rs:210:29
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let snake = Snake::new();
[INFO] [stdout]     |         ----- move occurs because `snake` has type `Snake`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 167 |     thread::spawn(move || {
[INFO] [stdout]     |                   ------- value moved into closure here
[INFO] [stdout] ...
[INFO] [stdout] 174 |                     snake.change_direction(Direction::Up);
[INFO] [stdout]     |                     ----- variable moved due to use in closure
[INFO] [stdout] ...
[INFO] [stdout] 210 |     game_logic(&mut stdout, &mut snake, &mut food);  
[INFO] [stdout]     |                             ^^^^^^^^^^ value borrowed here after move
[INFO] [stdout]     |
[INFO] [stdout] note: if `Snake` implemented `Clone`, you could clone the value
[INFO] [stdout]    --> src/main.rs:23:1
[INFO] [stdout]     |
[INFO] [stdout]  23 | struct Snake {
[INFO] [stdout]     | ^^^^^^^^^^^^ consider implementing `Clone` for this type
[INFO] [stdout] ...
[INFO] [stdout] 174 |                     snake.change_direction(Direction::Up);
[INFO] [stdout]     |                     ----- you could clone this value
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0596]: cannot borrow `snake` as mutable, as it is not declared as mutable
[INFO] [stdout]    --> src/main.rs:210:29
[INFO] [stdout]     |
[INFO] [stdout] 210 |     game_logic(&mut stdout, &mut snake, &mut food);  
[INFO] [stdout]     |                             ^^^^^^^^^^ cannot borrow as mutable
[INFO] [stdout]     |
[INFO] [stdout] help: consider changing this to be mutable
[INFO] [stdout]     |
[INFO] [stdout] 157 |     let mut snake = Snake::new();
[INFO] [stdout]     |         +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0382, E0596.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `snake_game` (bin "snake_game" test) due to 6 previous errors; 1 warning emitted
[INFO] running `Command { std: "docker" "inspect" "ab47d9bfbb9a6d5b689354cfcae68aca00a132dc77938e9d7e76b46e0aba2779", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "ab47d9bfbb9a6d5b689354cfcae68aca00a132dc77938e9d7e76b46e0aba2779", kill_on_drop: false }`
[INFO] [stdout] ab47d9bfbb9a6d5b689354cfcae68aca00a132dc77938e9d7e76b46e0aba2779
