[INFO] cloning repository https://github.com/LasmGratel/cardgame-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/LasmGratel/cardgame-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLasmGratel%2Fcardgame-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLasmGratel%2Fcardgame-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ee4bec9755330531366aa3948ad8243913ef904d [INFO] checking LasmGratel/cardgame-rs against master#dfd7b8d03fb93d0e03147d28b3be6d93260fa94d for pr-87050 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLasmGratel%2Fcardgame-rs" "/workspace/builds/worker-10/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-10/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/LasmGratel/cardgame-rs on toolchain dfd7b8d03fb93d0e03147d28b3be6d93260fa94d [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/LasmGratel/cardgame-rs [INFO] finished tweaking git repo https://github.com/LasmGratel/cardgame-rs [INFO] tweaked toml for git repo https://github.com/LasmGratel/cardgame-rs written to /workspace/builds/worker-10/source/Cargo.toml [INFO] crate git repo https://github.com/LasmGratel/cardgame-rs already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "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-10/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 77105dc6cdff6de413e2c55993179e4fad53fce50f4c1722a6d24ca42a1f7ceb [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "77105dc6cdff6de413e2c55993179e4fad53fce50f4c1722a6d24ca42a1f7ceb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "77105dc6cdff6de413e2c55993179e4fad53fce50f4c1722a6d24ca42a1f7ceb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77105dc6cdff6de413e2c55993179e4fad53fce50f4c1722a6d24ca42a1f7ceb", kill_on_drop: false }` [INFO] [stdout] 77105dc6cdff6de413e2c55993179e4fad53fce50f4c1722a6d24ca42a1f7ceb [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/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" "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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 1ce3bb1b0828cc26d14f6aec8f57916e1c3f92a4db5bbc5fda298f4d79ef755a [INFO] running `Command { std: "docker" "start" "-a" "1ce3bb1b0828cc26d14f6aec8f57916e1c3f92a4db5bbc5fda298f4d79ef755a", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.26 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.70 [INFO] [stderr] Compiling pkg-config v0.3.19 [INFO] [stderr] Compiling serde_derive v1.0.125 [INFO] [stderr] Compiling serde v1.0.125 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling typenum v1.13.0 [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Compiling memchr v2.4.0 [INFO] [stderr] Checking tinyvec_macros v0.1.0 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Checking itoa v0.4.7 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Checking once_cell v1.7.2 [INFO] [stderr] Compiling native-tls v0.2.7 [INFO] [stderr] Checking bytes v1.0.1 [INFO] [stderr] Compiling serde_json v1.0.64 [INFO] [stderr] Checking regex-syntax v0.6.25 [INFO] [stderr] Checking opaque-debug v0.3.0 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Checking utf-8 v0.7.6 [INFO] [stderr] Checking byteorder v1.4.3 [INFO] [stderr] Checking base64 v0.13.0 [INFO] [stderr] Checking integer-encoding v3.0.2 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling crossbeam-utils v0.8.3 [INFO] [stderr] Checking unicode-bidi v0.3.5 [INFO] [stderr] Checking form_urlencoded v1.0.1 [INFO] [stderr] Checking tinyvec v1.2.0 [INFO] [stderr] Checking getrandom v0.2.2 [INFO] [stderr] Checking net2 v0.2.37 [INFO] [stderr] Checking input_buffer v0.4.0 [INFO] [stderr] Checking http v0.2.4 [INFO] [stderr] Compiling generic-array v0.14.4 [INFO] [stderr] Checking mio v0.7.11 [INFO] [stderr] Checking rand_core v0.6.2 [INFO] [stderr] Compiling openssl-sys v0.9.61 [INFO] [stderr] Checking aho-corasick v0.7.18 [INFO] [stderr] Checking rand_chacha v0.3.0 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Checking crossbeam-channel v0.5.1 [INFO] [stderr] Checking rand v0.8.3 [INFO] [stderr] Checking unicode-normalization v0.1.17 [INFO] [stderr] Compiling openssl v0.10.33 [INFO] [stderr] Checking block-buffer v0.9.0 [INFO] [stderr] Checking digest v0.9.0 [INFO] [stderr] Checking sha-1 v0.9.4 [INFO] [stderr] Checking regex v1.5.4 [INFO] [stderr] Checking idna v0.2.3 [INFO] [stderr] Checking url v2.2.1 [INFO] [stderr] Compiling thiserror-impl v1.0.24 [INFO] [stderr] Compiling num-derive v0.3.3 [INFO] [stderr] Compiling strum_macros v0.20.1 [INFO] [stderr] Checking thiserror v1.0.24 [INFO] [stderr] Checking strum v0.20.0 [INFO] [stderr] Checking tungstenite v0.13.0 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking uuid v0.8.2 [INFO] [stderr] Checking message-io v0.13.2 [INFO] [stderr] Checking cardgame v0.1.0 (/opt/rustwide/workdir/cardgame) [INFO] [stdout] warning: unused import: `std::env::join_paths` [INFO] [stdout] --> cardgame/src/user.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::env::join_paths; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::env::join_paths` [INFO] [stdout] --> cardgame/src/user.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::env::join_paths; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> cardgame/src/game.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | for p in self [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> cardgame/src/lobby.rs:39:40 [INFO] [stdout] | [INFO] [stdout] 39 | self.game.start().map_err(|e| RoomError::NotReady) // TODO [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cards` [INFO] [stdout] --> cardgame/src/rule.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | fn matches(&self, cards: &Vec) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_cards` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cards` [INFO] [stdout] --> cardgame/src/rule.rs:261:23 [INFO] [stdout] | [INFO] [stdout] 261 | fn matches(&self, cards: &Vec) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_cards` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> cardgame/src/user.rs:154:58 [INFO] [stdout] | [INFO] [stdout] 154 | serde_json::from_str(&str.unwrap()).map_err(|e| ()) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `second` [INFO] [stdout] --> cardgame/src/rule.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | second: Card, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `second` [INFO] [stdout] --> cardgame/src/rule.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | second: Card, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `second` [INFO] [stdout] --> cardgame/src/rule.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | second: Card, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> cardgame/src/game.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | for p in self [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> cardgame/src/lobby.rs:39:40 [INFO] [stdout] | [INFO] [stdout] 39 | self.game.start().map_err(|e| RoomError::NotReady) // TODO [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cards` [INFO] [stdout] --> cardgame/src/rule.rs:70:23 [INFO] [stdout] | [INFO] [stdout] 70 | fn matches(&self, cards: &Vec) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_cards` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cards` [INFO] [stdout] --> cardgame/src/rule.rs:261:23 [INFO] [stdout] | [INFO] [stdout] 261 | fn matches(&self, cards: &Vec) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_cards` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> cardgame/src/user.rs:154:58 [INFO] [stdout] | [INFO] [stdout] 154 | serde_json::from_str(&str.unwrap()).map_err(|e| ()) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame/src/user.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | fs::create_dir(p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame/src/user.rs:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | fs::create_dir(p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame/src/user.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | fs::write(path, serde_json::to_string(user).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 12 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `second` [INFO] [stdout] --> cardgame/src/rule.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | second: Card, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `second` [INFO] [stdout] --> cardgame/src/rule.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | second: Card, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `second` [INFO] [stdout] --> cardgame/src/rule.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | second: Card, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame/src/user.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | fs::create_dir(p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame/src/user.rs:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | fs::create_dir(p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame/src/user.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | fs::write(path, serde_json::to_string(user).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 12 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking cardgame-client v0.1.0 (/opt/rustwide/workdir/cardgame-client) [INFO] [stderr] Checking cardgame-server v0.1.0 (/opt/rustwide/workdir/cardgame-server) [INFO] [stdout] warning: unused import: `std::io` [INFO] [stdout] --> cardgame-client/src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::io; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> cardgame-client/src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `server_id` [INFO] [stdout] --> cardgame-client/src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | server_id: Endpoint, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_server_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `landlord` [INFO] [stdout] --> cardgame-client/src/main.rs:168:58 [INFO] [stdout] | [INFO] [stdout] 168 | ... if let S2CMessage::LordCards(landlord, cards) = msg { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_landlord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `run_readline_thread` [INFO] [stdout] --> cardgame-client/src/main.rs:223:4 [INFO] [stdout] | [INFO] [stdout] 223 | fn run_readline_thread() -> JoinHandle<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `message_io::node::*` [INFO] [stdout] --> cardgame-server/src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use message_io::node::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> cardgame-server/src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame-client/src/main.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 322 | run_console_thread(server_id.clone(), handler.clone(), rx).join(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io` [INFO] [stdout] --> cardgame-client/src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use std::io; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> cardgame-client/src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `message_io::node::*` [INFO] [stdout] --> cardgame-server/src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use message_io::node::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> cardgame-server/src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `room` [INFO] [stdout] --> cardgame-server/src/main.rs:88:56 [INFO] [stdout] | [INFO] [stdout] 88 | ... UserState::Playing(room) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_room` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `manager` [INFO] [stdout] --> cardgame-server/src/main.rs:187:10 [INFO] [stdout] | [INFO] [stdout] 187 | fn login(manager: UserManager, user_id: String) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_manager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user_id` [INFO] [stdout] --> cardgame-server/src/main.rs:187:32 [INFO] [stdout] | [INFO] [stdout] 187 | fn login(manager: UserManager, user_id: String) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_user_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return reference to temporary value [INFO] [stdout] --> cardgame-server/src/main.rs:42:64 [INFO] [stdout] | [INFO] [stdout] 42 | client_map.get_by_right(&endpoint).map(|x| &user_manager.get_user_safe(x).unwrap()) [INFO] [stdout] | ^-------------------------------------- [INFO] [stdout] | || [INFO] [stdout] | |temporary value created here [INFO] [stdout] | returns a reference to data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: captured variable cannot escape `FnMut` closure body [INFO] [stdout] --> cardgame-server/src/main.rs:46:25 [INFO] [stdout] | [INFO] [stdout] 44 | let get_room = || -> Option<&mut Room> { [INFO] [stdout] | - inferred to be a `FnMut` closure [INFO] [stdout] 45 | if let Some(UserState::Playing(room_name)) = user_states.get(client_map.get_by_right(&endpoint)?) { [INFO] [stdout] 46 | lobby.rooms.get_mut(room_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a reference to a captured variable which escapes the closure body [INFO] [stdout] | [INFO] [stdout] = note: `FnMut` closures only have access to their captured variables while they are executing... [INFO] [stdout] = note: ...therefore, they cannot allow references to captured variables to escape [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `client_map` as mutable because it is also borrowed as immutable [INFO] [stdout] --> cardgame-server/src/main.rs:70:25 [INFO] [stdout] | [INFO] [stdout] 41 | let get_user = || -> Option<&User> { [INFO] [stdout] | ------------------- immutable borrow occurs here [INFO] [stdout] 42 | client_map.get_by_right(&endpoint).map(|x| &user_manager.get_user_safe(x).unwrap()) [INFO] [stdout] | ---------- first borrow occurs due to use of `client_map` in closure [INFO] [stdout] ... [INFO] [stdout] 70 | client_map.insert(username.clone(), endpoint.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] 71 | [INFO] [stdout] 72 | let user = get_user().unwrap(); [INFO] [stdout] | -------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `room.game.players` as immutable because it is also borrowed as mutable [INFO] [stdout] --> cardgame-server/src/main.rs:117:51 [INFO] [stdout] | [INFO] [stdout] 115 | ... match room.start_game() { [INFO] [stdout] | ---- mutable borrow occurs here [INFO] [stdout] 116 | ... Ok(landlord_player) => { [INFO] [stdout] 117 | ... for player in room.game.players.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] 118 | ... send_to_user(player.user, &S2CMessage::GameStarted(player.cards.clone(), landlord_player.user.id.clone())) [INFO] [stdout] | ----------------------- mutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `get_room` as mutable, as it is not declared as mutable [INFO] [stdout] --> cardgame-server/src/main.rs:131:45 [INFO] [stdout] | [INFO] [stdout] 44 | let get_room = || -> Option<&mut Room> { [INFO] [stdout] | -------- help: consider changing this to be mutable: `mut get_room` [INFO] [stdout] 45 | if let Some(UserState::Playing(room_name)) = user_states.get(client_map.get_by_right(&endpoint)?) { [INFO] [stdout] 46 | lobby.rooms.get_mut(room_name) [INFO] [stdout] | ----------- calling `get_room` requires mutable binding due to mutable borrow of `lobby` [INFO] [stdout] ... [INFO] [stdout] 131 | if let Some(room) = get_room() { [INFO] [stdout] | ^^^^^^^^ cannot borrow as mutable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `get_room` as mutable, as it is not declared as mutable [INFO] [stdout] --> cardgame-server/src/main.rs:147:45 [INFO] [stdout] | [INFO] [stdout] 44 | let get_room = || -> Option<&mut Room> { [INFO] [stdout] | -------- help: consider changing this to be mutable: `mut get_room` [INFO] [stdout] 45 | if let Some(UserState::Playing(room_name)) = user_states.get(client_map.get_by_right(&endpoint)?) { [INFO] [stdout] 46 | lobby.rooms.get_mut(room_name) [INFO] [stdout] | ----------- calling `get_room` requires mutable binding due to mutable borrow of `lobby` [INFO] [stdout] ... [INFO] [stdout] 147 | if let Some(room) = get_room() { [INFO] [stdout] | ^^^^^^^^ cannot borrow as mutable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0521]: borrowed data escapes outside of closure [INFO] [stdout] --> cardgame-server/src/main.rs:171:21 [INFO] [stdout] | [INFO] [stdout] 28 | let mut lobby = Lobby::new(); [INFO] [stdout] | --------- `lobby` declared here, outside of the closure body [INFO] [stdout] ... [INFO] [stdout] 171 | lobby.disconnect(user); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `room` [INFO] [stdout] --> cardgame-server/src/main.rs:88:56 [INFO] [stdout] | [INFO] [stdout] 88 | ... UserState::Playing(room) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_room` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `server_id` [INFO] [stdout] --> cardgame-client/src/main.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | server_id: Endpoint, [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_server_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `landlord` [INFO] [stdout] --> cardgame-client/src/main.rs:168:58 [INFO] [stdout] | [INFO] [stdout] 168 | ... if let S2CMessage::LordCards(landlord, cards) = msg { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_landlord` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors; 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0502, E0515, E0521, E0596. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0502`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `manager` [INFO] [stdout] --> cardgame-server/src/main.rs:187:10 [INFO] [stdout] | [INFO] [stdout] 187 | fn login(manager: UserManager, user_id: String) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_manager` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user_id` [INFO] [stdout] --> cardgame-server/src/main.rs:187:32 [INFO] [stdout] | [INFO] [stdout] 187 | fn login(manager: UserManager, user_id: String) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_user_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `cardgame-server` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0515]: cannot return reference to temporary value [INFO] [stdout] --> cardgame-server/src/main.rs:42:64 [INFO] [stdout] | [INFO] [stdout] 42 | client_map.get_by_right(&endpoint).map(|x| &user_manager.get_user_safe(x).unwrap()) [INFO] [stdout] | ^-------------------------------------- [INFO] [stdout] | || [INFO] [stdout] | |temporary value created here [INFO] [stdout] | returns a reference to data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: captured variable cannot escape `FnMut` closure body [INFO] [stdout] --> cardgame-server/src/main.rs:46:25 [INFO] [stdout] | [INFO] [stdout] 44 | let get_room = || -> Option<&mut Room> { [INFO] [stdout] | - inferred to be a `FnMut` closure [INFO] [stdout] 45 | if let Some(UserState::Playing(room_name)) = user_states.get(client_map.get_by_right(&endpoint)?) { [INFO] [stdout] 46 | lobby.rooms.get_mut(room_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returns a reference to a captured variable which escapes the closure body [INFO] [stdout] | [INFO] [stdout] = note: `FnMut` closures only have access to their captured variables while they are executing... [INFO] [stdout] = note: ...therefore, they cannot allow references to captured variables to escape [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `client_map` as mutable because it is also borrowed as immutable [INFO] [stdout] --> cardgame-server/src/main.rs:70:25 [INFO] [stdout] | [INFO] [stdout] 41 | let get_user = || -> Option<&User> { [INFO] [stdout] | ------------------- immutable borrow occurs here [INFO] [stdout] 42 | client_map.get_by_right(&endpoint).map(|x| &user_manager.get_user_safe(x).unwrap()) [INFO] [stdout] | ---------- first borrow occurs due to use of `client_map` in closure [INFO] [stdout] ... [INFO] [stdout] 70 | client_map.insert(username.clone(), endpoint.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] 71 | [INFO] [stdout] 72 | let user = get_user().unwrap(); [INFO] [stdout] | -------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `room.game.players` as immutable because it is also borrowed as mutable [INFO] [stdout] --> cardgame-server/src/main.rs:117:51 [INFO] [stdout] | [INFO] [stdout] 115 | ... match room.start_game() { [INFO] [stdout] | ---- mutable borrow occurs here [INFO] [stdout] 116 | ... Ok(landlord_player) => { [INFO] [stdout] 117 | ... for player in room.game.players.iter() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] 118 | ... send_to_user(player.user, &S2CMessage::GameStarted(player.cards.clone(), landlord_player.user.id.clone())) [INFO] [stdout] | ----------------------- mutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `get_room` as mutable, as it is not declared as mutable [INFO] [stdout] --> cardgame-server/src/main.rs:131:45 [INFO] [stdout] | [INFO] [stdout] 44 | let get_room = || -> Option<&mut Room> { [INFO] [stdout] | -------- help: consider changing this to be mutable: `mut get_room` [INFO] [stdout] 45 | if let Some(UserState::Playing(room_name)) = user_states.get(client_map.get_by_right(&endpoint)?) { [INFO] [stdout] 46 | lobby.rooms.get_mut(room_name) [INFO] [stdout] | ----------- calling `get_room` requires mutable binding due to mutable borrow of `lobby` [INFO] [stdout] ... [INFO] [stdout] 131 | if let Some(room) = get_room() { [INFO] [stdout] | ^^^^^^^^ cannot borrow as mutable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `get_room` as mutable, as it is not declared as mutable [INFO] [stdout] --> cardgame-server/src/main.rs:147:45 [INFO] [stdout] | [INFO] [stdout] 44 | let get_room = || -> Option<&mut Room> { [INFO] [stdout] | -------- help: consider changing this to be mutable: `mut get_room` [INFO] [stdout] 45 | if let Some(UserState::Playing(room_name)) = user_states.get(client_map.get_by_right(&endpoint)?) { [INFO] [stdout] 46 | lobby.rooms.get_mut(room_name) [INFO] [stdout] | ----------- calling `get_room` requires mutable binding due to mutable borrow of `lobby` [INFO] [stdout] ... [INFO] [stdout] 147 | if let Some(room) = get_room() { [INFO] [stdout] | ^^^^^^^^ cannot borrow as mutable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0521]: borrowed data escapes outside of closure [INFO] [stdout] --> cardgame-server/src/main.rs:171:21 [INFO] [stdout] | [INFO] [stdout] 28 | let mut lobby = Lobby::new(); [INFO] [stdout] | --------- `lobby` declared here, outside of the closure body [INFO] [stdout] ... [INFO] [stdout] 171 | lobby.disconnect(user); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors; 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0502, E0515, E0521, E0596. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0502`. [INFO] [stdout] [INFO] [stdout] warning: function is never used: `run_readline_thread` [INFO] [stdout] --> cardgame-client/src/main.rs:223:4 [INFO] [stdout] | [INFO] [stdout] 223 | fn run_readline_thread() -> JoinHandle<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> cardgame-client/src/main.rs:322:5 [INFO] [stdout] | [INFO] [stdout] 322 | run_console_thread(server_id.clone(), handler.clone(), rx).join(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "1ce3bb1b0828cc26d14f6aec8f57916e1c3f92a4db5bbc5fda298f4d79ef755a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1ce3bb1b0828cc26d14f6aec8f57916e1c3f92a4db5bbc5fda298f4d79ef755a", kill_on_drop: false }` [INFO] [stdout] 1ce3bb1b0828cc26d14f6aec8f57916e1c3f92a4db5bbc5fda298f4d79ef755a