[INFO] cloning repository https://github.com/lyndon-samson/rust-text-rpg [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/lyndon-samson/rust-text-rpg" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flyndon-samson%2Frust-text-rpg", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flyndon-samson%2Frust-text-rpg'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 336557b4ece3fc5c444a4bd8924b0cca732dcb23 [INFO] building lyndon-samson/rust-text-rpg against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flyndon-samson%2Frust-text-rpg" "/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/lyndon-samson/rust-text-rpg on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/lyndon-samson/rust-text-rpg [INFO] finished tweaking git repo https://github.com/lyndon-samson/rust-text-rpg [INFO] tweaked toml for git repo https://github.com/lyndon-samson/rust-text-rpg written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/lyndon-samson/rust-text-rpg 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "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-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 957c84151f6eedc6e48136e68614815c81c9e5a2e127ae5b7a2514371003ef93 [INFO] running `Command { std: "docker" "start" "-a" "957c84151f6eedc6e48136e68614815c81c9e5a2e127ae5b7a2514371003ef93", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "957c84151f6eedc6e48136e68614815c81c9e5a2e127ae5b7a2514371003ef93", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "957c84151f6eedc6e48136e68614815c81c9e5a2e127ae5b7a2514371003ef93", kill_on_drop: false }` [INFO] [stdout] 957c84151f6eedc6e48136e68614815c81c9e5a2e127ae5b7a2514371003ef93 [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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f6557331db02ee592b7793dbdfd5171f4819d4b377f4d6731c2e46cf6eaa53c4 [INFO] running `Command { std: "docker" "start" "-a" "f6557331db02ee592b7793dbdfd5171f4819d4b377f4d6731c2e46cf6eaa53c4", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.17 [INFO] [stderr] Compiling yansi v0.5.1 [INFO] [stderr] Compiling getrandom v0.2.11 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling rust-text-rpg v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Color` [INFO] [stdout] --> src/main.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use yansi::{Paint, Color}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `PLAYER_WINS` should have an upper camel case name [INFO] [stdout] --> src/main.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `PlayerWins` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NPC_WINS` should have an upper camel case name [INFO] [stdout] --> src/main.rs:14:35 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `NpcWins` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `FIGHT_CONTINUES` should have an upper camel case name [INFO] [stdout] --> src/main.rs:14:45 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `FightContinues` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EXIT_GAME` should have an upper camel case name [INFO] [stdout] --> src/main.rs:15:45 [INFO] [stdout] | [INFO] [stdout] 15 | enum CommandResult { NONE, CONTINUE, BREAK, EXIT_GAME } [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `ExitGame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/main.rs:133:36 [INFO] [stdout] | [INFO] [stdout] 133 | player.spells.push(Item::clone((spell_defs.get("spell.magicmissle").unwrap()))); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 133 - player.spells.push(Item::clone((spell_defs.get("spell.magicmissle").unwrap()))); [INFO] [stdout] 133 + player.spells.push(Item::clone(spell_defs.get("spell.magicmissle").unwrap())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/main.rs:151:39 [INFO] [stdout] | [INFO] [stdout] 151 | player.inventory.push(Item::clone((item_defs.get("potion.healing").unwrap()))); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 151 - player.inventory.push(Item::clone((item_defs.get("potion.healing").unwrap()))); [INFO] [stdout] 151 + player.inventory.push(Item::clone(item_defs.get("potion.healing").unwrap())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `res` is assigned to, but never used [INFO] [stdout] --> src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let res : CommandResult; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_res` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `res` is never read [INFO] [stdout] --> src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | res = (cmd.unwrap().action)(action_args, Location::clone(cloc),&mut game.player,&mut mon); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut player = create_player(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut cloc = game.locations.iter().find(|l| l.id == game.player.location).unwrap(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `action_args` [INFO] [stdout] --> src/main.rs:96:91 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_action_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cloc` [INFO] [stdout] --> src/main.rs:96:103 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_cloc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `player` [INFO] [stdout] --> src/main.rs:96:109 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_player` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mon` [INFO] [stdout] --> src/main.rs:96:117 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_mon` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let mut player = Creature { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `player` [INFO] [stdout] --> src/main.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | use_item : |player, mon| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_player` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mon` [INFO] [stdout] --> src/main.rs:125:29 [INFO] [stdout] | [INFO] [stdout] 125 | use_item : |player, mon| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_mon` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:126:17 [INFO] [stdout] | [INFO] [stdout] 126 | let mut res = CommandResult::CONTINUE; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `monster` [INFO] [stdout] --> src/main.rs:142:22 [INFO] [stdout] | [INFO] [stdout] 142 | Some(monster) => { println!("Monster passed"); } [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_monster` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NPC` is never constructed [INFO] [stdout] --> src/main.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | enum CreatureType { PLAYER, NPC } [INFO] [stdout] | ------------ ^^^ [INFO] [stdout] | | [INFO] [stdout] | variant in this enum [INFO] [stdout] | [INFO] [stdout] = note: `CreatureType` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `IDLE` and `FIGHT` are never constructed [INFO] [stdout] --> src/main.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | enum ActivityMode { IDLE, FIGHT, ALL } [INFO] [stdout] | ------------ ^^^^ ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | variants in this enum [INFO] [stdout] | [INFO] [stdout] = note: `ActivityMode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `FightResult` is never used [INFO] [stdout] --> src/main.rs:14:6 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `NONE`, `BREAK`, and `EXIT_GAME` are never constructed [INFO] [stdout] --> src/main.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | enum CommandResult { NONE, CONTINUE, BREAK, EXIT_GAME } [INFO] [stdout] | ------------- ^^^^ ^^^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | variants in this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 18 | struct Creature { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 19 | ctype: CreatureType, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 20 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 21 | description: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 22 | location:u32, [INFO] [stdout] 23 | str: u32, dex: u32, int: u32, hp:i32, mhp:i32, xp:u32, defeat_xp:u32, [INFO] [stdout] | ^^^ ^^^ ^^^ ^^^ ^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Creature` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/main.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 28 | struct Item { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 29 | itype : ItemType, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 30 | class : String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 31 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 32 | description : String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 33 | weight:u32, size:u32, [INFO] [stdout] | ^^^^^^ ^^^^ [INFO] [stdout] 34 | use_item: fn(&mut Creature,Option <&mut Creature>) -> CommandResult [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Item` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/main.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 37 | struct Location { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 38 | id: u32, [INFO] [stdout] 39 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 40 | description:String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 41 | n:i32,ne:i32,e:i32,se:i32,s:i32,sw:i32,w:i32,nw:i32,u:i32,d:i32 [INFO] [stdout] | ^ ^^ ^ ^^ ^ ^^ ^ ^^ ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `Location` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | io::stdout().flush() ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 157 | let _ = io::stdout().flush() ; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.31s [INFO] running `Command { std: "docker" "inspect" "f6557331db02ee592b7793dbdfd5171f4819d4b377f4d6731c2e46cf6eaa53c4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f6557331db02ee592b7793dbdfd5171f4819d4b377f4d6731c2e46cf6eaa53c4", kill_on_drop: false }` [INFO] [stdout] f6557331db02ee592b7793dbdfd5171f4819d4b377f4d6731c2e46cf6eaa53c4 [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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 16bcabb5d42dedec0997f38c70b2dc9c32165555255b67c06b14d63fa8a5963d [INFO] running `Command { std: "docker" "start" "-a" "16bcabb5d42dedec0997f38c70b2dc9c32165555255b67c06b14d63fa8a5963d", kill_on_drop: false }` [INFO] [stderr] Compiling rust-text-rpg v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Color` [INFO] [stdout] --> src/main.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | use yansi::{Paint, Color}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `PLAYER_WINS` should have an upper camel case name [INFO] [stdout] --> src/main.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `PlayerWins` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NPC_WINS` should have an upper camel case name [INFO] [stdout] --> src/main.rs:14:35 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `NpcWins` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `FIGHT_CONTINUES` should have an upper camel case name [INFO] [stdout] --> src/main.rs:14:45 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `FightContinues` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `EXIT_GAME` should have an upper camel case name [INFO] [stdout] --> src/main.rs:15:45 [INFO] [stdout] | [INFO] [stdout] 15 | enum CommandResult { NONE, CONTINUE, BREAK, EXIT_GAME } [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `ExitGame` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/main.rs:133:36 [INFO] [stdout] | [INFO] [stdout] 133 | player.spells.push(Item::clone((spell_defs.get("spell.magicmissle").unwrap()))); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 133 - player.spells.push(Item::clone((spell_defs.get("spell.magicmissle").unwrap()))); [INFO] [stdout] 133 + player.spells.push(Item::clone(spell_defs.get("spell.magicmissle").unwrap())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/main.rs:151:39 [INFO] [stdout] | [INFO] [stdout] 151 | player.inventory.push(Item::clone((item_defs.get("potion.healing").unwrap()))); [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 151 - player.inventory.push(Item::clone((item_defs.get("potion.healing").unwrap()))); [INFO] [stdout] 151 + player.inventory.push(Item::clone(item_defs.get("potion.healing").unwrap())); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `res` is assigned to, but never used [INFO] [stdout] --> src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let res : CommandResult; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_res` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `res` is never read [INFO] [stdout] --> src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | res = (cmd.unwrap().action)(action_args, Location::clone(cloc),&mut game.player,&mut mon); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut player = create_player(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let mut cloc = game.locations.iter().find(|l| l.id == game.player.location).unwrap(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `action_args` [INFO] [stdout] --> src/main.rs:96:91 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_action_args` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cloc` [INFO] [stdout] --> src/main.rs:96:103 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_cloc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `player` [INFO] [stdout] --> src/main.rs:96:109 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_player` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mon` [INFO] [stdout] --> src/main.rs:96:117 [INFO] [stdout] | [INFO] [stdout] 96 | game.commands.push(Command { command:"h".to_string(), mode:ActivityMode::ALL, action: |action_args,cloc, player, mon| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_mon` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | let mut player = Creature { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `player` [INFO] [stdout] --> src/main.rs:125:21 [INFO] [stdout] | [INFO] [stdout] 125 | use_item : |player, mon| { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_player` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mon` [INFO] [stdout] --> src/main.rs:125:29 [INFO] [stdout] | [INFO] [stdout] 125 | use_item : |player, mon| { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_mon` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:126:17 [INFO] [stdout] | [INFO] [stdout] 126 | let mut res = CommandResult::CONTINUE; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `monster` [INFO] [stdout] --> src/main.rs:142:22 [INFO] [stdout] | [INFO] [stdout] 142 | Some(monster) => { println!("Monster passed"); } [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_monster` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NPC` is never constructed [INFO] [stdout] --> src/main.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | enum CreatureType { PLAYER, NPC } [INFO] [stdout] | ------------ ^^^ [INFO] [stdout] | | [INFO] [stdout] | variant in this enum [INFO] [stdout] | [INFO] [stdout] = note: `CreatureType` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `IDLE` and `FIGHT` are never constructed [INFO] [stdout] --> src/main.rs:13:22 [INFO] [stdout] | [INFO] [stdout] 13 | enum ActivityMode { IDLE, FIGHT, ALL } [INFO] [stdout] | ------------ ^^^^ ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | variants in this enum [INFO] [stdout] | [INFO] [stdout] = note: `ActivityMode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `FightResult` is never used [INFO] [stdout] --> src/main.rs:14:6 [INFO] [stdout] | [INFO] [stdout] 14 | enum FightResult { PLAYER_WINS, NPC_WINS, FIGHT_CONTINUES } [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `NONE`, `BREAK`, and `EXIT_GAME` are never constructed [INFO] [stdout] --> src/main.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | enum CommandResult { NONE, CONTINUE, BREAK, EXIT_GAME } [INFO] [stdout] | ------------- ^^^^ ^^^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | variants in this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 18 | struct Creature { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 19 | ctype: CreatureType, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 20 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 21 | description: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 22 | location:u32, [INFO] [stdout] 23 | str: u32, dex: u32, int: u32, hp:i32, mhp:i32, xp:u32, defeat_xp:u32, [INFO] [stdout] | ^^^ ^^^ ^^^ ^^^ ^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Creature` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/main.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 28 | struct Item { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 29 | itype : ItemType, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 30 | class : String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 31 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 32 | description : String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 33 | weight:u32, size:u32, [INFO] [stdout] | ^^^^^^ ^^^^ [INFO] [stdout] 34 | use_item: fn(&mut Creature,Option <&mut Creature>) -> CommandResult [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Item` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> src/main.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 37 | struct Location { [INFO] [stdout] | -------- fields in this struct [INFO] [stdout] 38 | id: u32, [INFO] [stdout] 39 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 40 | description:String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 41 | n:i32,ne:i32,e:i32,se:i32,s:i32,sw:i32,w:i32,nw:i32,u:i32,d:i32 [INFO] [stdout] | ^ ^^ ^ ^^ ^ ^^ ^ ^^ ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `Location` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | io::stdout().flush() ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 157 | let _ = io::stdout().flush() ; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s [INFO] running `Command { std: "docker" "inspect" "16bcabb5d42dedec0997f38c70b2dc9c32165555255b67c06b14d63fa8a5963d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "16bcabb5d42dedec0997f38c70b2dc9c32165555255b67c06b14d63fa8a5963d", kill_on_drop: false }` [INFO] [stdout] 16bcabb5d42dedec0997f38c70b2dc9c32165555255b67c06b14d63fa8a5963d