[INFO] cloning repository https://github.com/Shoggomo/qu-qu [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Shoggomo/qu-qu" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FShoggomo%2Fqu-qu", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FShoggomo%2Fqu-qu'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8d73a36e4915c94252c9a9e151ab63a38ec76a21 [INFO] checking Shoggomo/qu-qu against try#595142ec72045c7f2fab2923de8e59995a52e6e7 for pr-151830 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FShoggomo%2Fqu-qu" "/workspace/builds/worker-1-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Shoggomo/qu-qu [INFO] finished tweaking git repo https://github.com/Shoggomo/qu-qu [INFO] tweaked toml for git repo https://github.com/Shoggomo/qu-qu written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Shoggomo/qu-qu on toolchain 595142ec72045c7f2fab2923de8e59995a52e6e7 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+595142ec72045c7f2fab2923de8e59995a52e6e7" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Shoggomo/qu-qu 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" "+595142ec72045c7f2fab2923de8e59995a52e6e7" "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-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:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+595142ec72045c7f2fab2923de8e59995a52e6e7" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 14553570bb190ef54d84f43b03c462972cb0040b8295f0081e7cbbb427a88f98 [INFO] running `Command { std: "docker" "start" "-a" "14553570bb190ef54d84f43b03c462972cb0040b8295f0081e7cbbb427a88f98", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "14553570bb190ef54d84f43b03c462972cb0040b8295f0081e7cbbb427a88f98", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "14553570bb190ef54d84f43b03c462972cb0040b8295f0081e7cbbb427a88f98", kill_on_drop: false }` [INFO] [stdout] 14553570bb190ef54d84f43b03c462972cb0040b8295f0081e7cbbb427a88f98 [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:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+595142ec72045c7f2fab2923de8e59995a52e6e7" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ff74657c12fe5a83a675aa671012fcb083aa8aed666e1f6e0333cc96e4c89afd [INFO] running `Command { std: "docker" "start" "-a" "ff74657c12fe5a83a675aa671012fcb083aa8aed666e1f6e0333cc96e4c89afd", kill_on_drop: false }` [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking itertools v0.10.3 [INFO] [stderr] Checking qu-qu v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected one of `->`, `where`, or `{`, found keyword `pub` [INFO] [stdout] --> src/player.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 11 | impl<'a> Player<'a> { [INFO] [stdout] | - while parsing this item list starting here [INFO] [stdout] ... [INFO] [stdout] 71 | pub fn define_has_not_card() [INFO] [stdout] | - expected one of `->`, `where`, or `{` [INFO] [stdout] 72 | [INFO] [stdout] 73 | pub fn amount_defined_cards_of_class(&self, class: &Class) -> usize { [INFO] [stdout] | ^^^ unexpected token [INFO] [stdout] ... [INFO] [stdout] 98 | } [INFO] [stdout] | - the item list ends here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `->`, `where`, or `{`, found keyword `pub` [INFO] [stdout] --> src/player.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 11 | impl<'a> Player<'a> { [INFO] [stdout] | - while parsing this item list starting here [INFO] [stdout] ... [INFO] [stdout] 71 | pub fn define_has_not_card() [INFO] [stdout] | - expected one of `->`, `where`, or `{` [INFO] [stdout] 72 | [INFO] [stdout] 73 | pub fn amount_defined_cards_of_class(&self, class: &Class) -> usize { [INFO] [stdout] | ^^^ unexpected token [INFO] [stdout] ... [INFO] [stdout] 98 | } [INFO] [stdout] | - the item list ends here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: requires a destination and format arguments, like `write!(dest, "format string", args...)` [INFO] [stdout] --> src/card.rs:12:38 [INFO] [stdout] | [INFO] [stdout] 12 | Class::Defined(class) => write!(class), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: requires a destination and format arguments, like `write!(dest, "format string", args...)` [INFO] [stdout] --> src/card.rs:13:33 [INFO] [stdout] | [INFO] [stdout] 13 | Class::Undefined => write!("Undefined"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: requires a destination and format arguments, like `write!(dest, "format string", args...)` [INFO] [stdout] --> src/card.rs:12:38 [INFO] [stdout] | [INFO] [stdout] 12 | Class::Defined(class) => write!(class), [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: requires a destination and format arguments, like `write!(dest, "format string", args...)` [INFO] [stdout] --> src/card.rs:13:33 [INFO] [stdout] | [INFO] [stdout] 13 | Class::Undefined => write!("Undefined"), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/player.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Class` [INFO] [stdout] --> src/game.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::card::{Card, Class}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `itertools::Itertools` [INFO] [stdout] --> src/player.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Class` [INFO] [stdout] --> src/game.rs:1:25 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::card::{Card, Class}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `remove_card` found for mutable reference `&mut Player<'_>` in the current scope [INFO] [stdout] --> src/actions.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | match from_player.remove_card(card) { [INFO] [stdout] | ^^^^^^^^^^^ method not found in `&mut Player<'_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `add_card` found for mutable reference `&mut Player<'_>` in the current scope [INFO] [stdout] --> src/actions.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | to_player.add_card(card); [INFO] [stdout] | ^^^^^^^^ method not found in `&mut Player<'_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `asked` [INFO] [stdout] --> src/game.rs:124:72 [INFO] [stdout] | [INFO] [stdout] 124 | (State::AskingForCard { game_data }, Event::AskedForCard { asked, asker, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `asked: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `asker` [INFO] [stdout] --> src/game.rs:124:79 [INFO] [stdout] | [INFO] [stdout] 124 | (State::AskingForCard { game_data }, Event::AskedForCard { asked, asker, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `asker: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `card` [INFO] [stdout] --> src/game.rs:124:86 [INFO] [stdout] | [INFO] [stdout] 124 | (State::AskingForCard { game_data }, Event::AskedForCard { asked, asker, card }) => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `card: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `giver` [INFO] [stdout] --> src/game.rs:133:76 [INFO] [stdout] | [INFO] [stdout] 133 | (State::HandingOverCard { game_data }, Event::CardHandedOver { giver, reciever, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `giver: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reciever` [INFO] [stdout] --> src/game.rs:133:83 [INFO] [stdout] | [INFO] [stdout] 133 | (State::HandingOverCard { game_data }, Event::CardHandedOver { giver, reciever, card }) => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `reciever: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `card` [INFO] [stdout] --> src/game.rs:133:93 [INFO] [stdout] | [INFO] [stdout] 133 | (State::HandingOverCard { game_data }, Event::CardHandedOver { giver, reciever, card }) => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `card: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `giver` [INFO] [stdout] --> src/game.rs:142:79 [INFO] [stdout] | [INFO] [stdout] 142 | (State::HandingOverCard { game_data }, Event::CardNotHandedOver { giver, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `giver: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `card` [INFO] [stdout] --> src/game.rs:142:86 [INFO] [stdout] | [INFO] [stdout] 142 | (State::HandingOverCard { game_data }, Event::CardNotHandedOver { giver, card }) => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `card: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/paradox_checks.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | let classes = game.all_cards().iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use [INFO] [stdout] 32 | .unique_by(|c| c.class()) [INFO] [stdout] 33 | .collect::>(); [INFO] [stdout] | - temporary value is freed at the end of this statement [INFO] [stdout] 34 | [INFO] [stdout] 35 | if classes.len() <= 4 { [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider consuming the `Vec<&Card<'_>>` when turning it into an `Iterator` [INFO] [stdout] | [INFO] [stdout] 31 | let classes = game.all_cards().into_iter() [INFO] [stdout] | +++++ [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 31 ~ let binding = game.all_cards(); [INFO] [stdout] 32 ~ let classes = binding.iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `qu-qu` (lib) due to 11 previous errors; 10 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0515]: cannot return value referencing local variable `message` [INFO] [stdout] --> src/paradox_checks.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | Err(message.as_str()) [INFO] [stdout] | ^^^^-------^^^^^^^^^^ [INFO] [stdout] | | | [INFO] [stdout] | | `message` is borrowed here [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `new_state` because it is borrowed [INFO] [stdout] --> src/actions.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn define_player_has_card_of_class<'a>(game: &GameData<'a>, class: &Class<'a>) -> Result, Paradox<'a>> { [INFO] [stdout] | -- lifetime `'a` defined here [INFO] [stdout] 9 | let mut new_state = game.clone(); [INFO] [stdout] | ------------- binding `new_state` declared here [INFO] [stdout] 10 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- borrow of `new_state.players` occurs here [INFO] [stdout] ... [INFO] [stdout] 13 | Ok(_) => Ok(new_state), [INFO] [stdout] | ^^^^^^^^^ move out of `new_state` occurs here [INFO] [stdout] 14 | Err(paradox) => Err(paradox) [INFO] [stdout] | ------------ returning this value requires that `new_state.players` is borrowed for `'a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local data `new_state.players` [INFO] [stdout] --> src/actions.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 10 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- `new_state.players` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 14 | Err(paradox) => Err(paradox) [INFO] [stdout] | ^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `new_state` because it is borrowed [INFO] [stdout] --> src/actions.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn define_player_has_card<'a>(game: &GameData<'a>, card: &'a Card<'a>) -> Result, Paradox<'a>> { [INFO] [stdout] | -- lifetime `'a` defined here [INFO] [stdout] 19 | let mut new_state = game.clone(); [INFO] [stdout] | ------------- binding `new_state` declared here [INFO] [stdout] 20 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- borrow of `new_state.players` occurs here [INFO] [stdout] ... [INFO] [stdout] 23 | Ok(_) => Ok(new_state), [INFO] [stdout] | ^^^^^^^^^ move out of `new_state` occurs here [INFO] [stdout] 24 | Err(paradox) => Err(paradox), [INFO] [stdout] | ------------ returning this value requires that `new_state.players` is borrowed for `'a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local data `new_state.players` [INFO] [stdout] --> src/actions.rs:24:25 [INFO] [stdout] | [INFO] [stdout] 20 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- `new_state.players` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 24 | Err(paradox) => Err(paradox), [INFO] [stdout] | ^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0505, E0515, E0599, E0716. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0505`. [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `remove_card` found for mutable reference `&mut Player<'_>` in the current scope [INFO] [stdout] --> src/actions.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | match from_player.remove_card(card) { [INFO] [stdout] | ^^^^^^^^^^^ method not found in `&mut Player<'_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `qu-qu` (lib test) due to 11 previous errors; 10 warnings emitted [INFO] [stdout] error[E0599]: no method named `add_card` found for mutable reference `&mut Player<'_>` in the current scope [INFO] [stdout] --> src/actions.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | to_player.add_card(card); [INFO] [stdout] | ^^^^^^^^ method not found in `&mut Player<'_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `asked` [INFO] [stdout] --> src/game.rs:124:72 [INFO] [stdout] | [INFO] [stdout] 124 | (State::AskingForCard { game_data }, Event::AskedForCard { asked, asker, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `asked: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `asker` [INFO] [stdout] --> src/game.rs:124:79 [INFO] [stdout] | [INFO] [stdout] 124 | (State::AskingForCard { game_data }, Event::AskedForCard { asked, asker, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `asker: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `card` [INFO] [stdout] --> src/game.rs:124:86 [INFO] [stdout] | [INFO] [stdout] 124 | (State::AskingForCard { game_data }, Event::AskedForCard { asked, asker, card }) => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `card: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `giver` [INFO] [stdout] --> src/game.rs:133:76 [INFO] [stdout] | [INFO] [stdout] 133 | (State::HandingOverCard { game_data }, Event::CardHandedOver { giver, reciever, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `giver: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reciever` [INFO] [stdout] --> src/game.rs:133:83 [INFO] [stdout] | [INFO] [stdout] 133 | (State::HandingOverCard { game_data }, Event::CardHandedOver { giver, reciever, card }) => { [INFO] [stdout] | ^^^^^^^^ help: try ignoring the field: `reciever: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `card` [INFO] [stdout] --> src/game.rs:133:93 [INFO] [stdout] | [INFO] [stdout] 133 | (State::HandingOverCard { game_data }, Event::CardHandedOver { giver, reciever, card }) => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `card: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `giver` [INFO] [stdout] --> src/game.rs:142:79 [INFO] [stdout] | [INFO] [stdout] 142 | (State::HandingOverCard { game_data }, Event::CardNotHandedOver { giver, card }) => { [INFO] [stdout] | ^^^^^ help: try ignoring the field: `giver: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `card` [INFO] [stdout] --> src/game.rs:142:86 [INFO] [stdout] | [INFO] [stdout] 142 | (State::HandingOverCard { game_data }, Event::CardNotHandedOver { giver, card }) => { [INFO] [stdout] | ^^^^ help: try ignoring the field: `card: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/paradox_checks.rs:31:19 [INFO] [stdout] | [INFO] [stdout] 31 | let classes = game.all_cards().iter() [INFO] [stdout] | ^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use [INFO] [stdout] 32 | .unique_by(|c| c.class()) [INFO] [stdout] 33 | .collect::>(); [INFO] [stdout] | - temporary value is freed at the end of this statement [INFO] [stdout] 34 | [INFO] [stdout] 35 | if classes.len() <= 4 { [INFO] [stdout] | ------- borrow later used here [INFO] [stdout] | [INFO] [stdout] help: consider consuming the `Vec<&Card<'_>>` when turning it into an `Iterator` [INFO] [stdout] | [INFO] [stdout] 31 | let classes = game.all_cards().into_iter() [INFO] [stdout] | +++++ [INFO] [stdout] help: consider using a `let` binding to create a longer lived value [INFO] [stdout] | [INFO] [stdout] 31 ~ let binding = game.all_cards(); [INFO] [stdout] 32 ~ let classes = binding.iter() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `message` [INFO] [stdout] --> src/paradox_checks.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | Err(message.as_str()) [INFO] [stdout] | ^^^^-------^^^^^^^^^^ [INFO] [stdout] | | | [INFO] [stdout] | | `message` is borrowed here [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `new_state` because it is borrowed [INFO] [stdout] --> src/actions.rs:13:21 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn define_player_has_card_of_class<'a>(game: &GameData<'a>, class: &Class<'a>) -> Result, Paradox<'a>> { [INFO] [stdout] | -- lifetime `'a` defined here [INFO] [stdout] 9 | let mut new_state = game.clone(); [INFO] [stdout] | ------------- binding `new_state` declared here [INFO] [stdout] 10 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- borrow of `new_state.players` occurs here [INFO] [stdout] ... [INFO] [stdout] 13 | Ok(_) => Ok(new_state), [INFO] [stdout] | ^^^^^^^^^ move out of `new_state` occurs here [INFO] [stdout] 14 | Err(paradox) => Err(paradox) [INFO] [stdout] | ------------ returning this value requires that `new_state.players` is borrowed for `'a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local data `new_state.players` [INFO] [stdout] --> src/actions.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 10 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- `new_state.players` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 14 | Err(paradox) => Err(paradox) [INFO] [stdout] | ^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0505]: cannot move out of `new_state` because it is borrowed [INFO] [stdout] --> src/actions.rs:23:21 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn define_player_has_card<'a>(game: &GameData<'a>, card: &'a Card<'a>) -> Result, Paradox<'a>> { [INFO] [stdout] | -- lifetime `'a` defined here [INFO] [stdout] 19 | let mut new_state = game.clone(); [INFO] [stdout] | ------------- binding `new_state` declared here [INFO] [stdout] 20 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- borrow of `new_state.players` occurs here [INFO] [stdout] ... [INFO] [stdout] 23 | Ok(_) => Ok(new_state), [INFO] [stdout] | ^^^^^^^^^ move out of `new_state` occurs here [INFO] [stdout] 24 | Err(paradox) => Err(paradox), [INFO] [stdout] | ------------ returning this value requires that `new_state.players` is borrowed for `'a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local data `new_state.players` [INFO] [stdout] --> src/actions.rs:24:25 [INFO] [stdout] | [INFO] [stdout] 20 | let player = new_state.players.get_mut(new_state.current_player_index).expect("Player not found!"); [INFO] [stdout] | ----------------- `new_state.players` is borrowed here [INFO] [stdout] ... [INFO] [stdout] 24 | Err(paradox) => Err(paradox), [INFO] [stdout] | ^^^^^^^^^^^^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0505, E0515, E0599, E0716. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0505`. [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "ff74657c12fe5a83a675aa671012fcb083aa8aed666e1f6e0333cc96e4c89afd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ff74657c12fe5a83a675aa671012fcb083aa8aed666e1f6e0333cc96e4c89afd", kill_on_drop: false }` [INFO] [stdout] ff74657c12fe5a83a675aa671012fcb083aa8aed666e1f6e0333cc96e4c89afd