[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] checking lyndon-samson/rust-text-rpg against try#6cbf54b1453b438241487f195740266bb9d8c8ba for pr-139587-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flyndon-samson%2Frust-text-rpg" "/workspace/builds/worker-1-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/lyndon-samson/rust-text-rpg on toolchain 6cbf54b1453b438241487f195740266bb9d8c8ba [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+6cbf54b1453b438241487f195740266bb9d8c8ba" "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-tc2/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" "+6cbf54b1453b438241487f195740266bb9d8c8ba" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+6cbf54b1453b438241487f195740266bb9d8c8ba" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] bfde2c5ff787502598c8ba2ec529bdb726853d3a1585d2f6275b7cdfa06e3752 [INFO] running `Command { std: "docker" "start" "-a" "bfde2c5ff787502598c8ba2ec529bdb726853d3a1585d2f6275b7cdfa06e3752", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "bfde2c5ff787502598c8ba2ec529bdb726853d3a1585d2f6275b7cdfa06e3752", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bfde2c5ff787502598c8ba2ec529bdb726853d3a1585d2f6275b7cdfa06e3752", kill_on_drop: false }` [INFO] [stdout] bfde2c5ff787502598c8ba2ec529bdb726853d3a1585d2f6275b7cdfa06e3752 [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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+6cbf54b1453b438241487f195740266bb9d8c8ba" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8a937ca4f0e97ab0586cf7fe1e81d8f95050848ccd469e5c89e63a904c2122fc [INFO] running `Command { std: "docker" "start" "-a" "8a937ca4f0e97ab0586cf7fe1e81d8f95050848ccd469e5c89e63a904c2122fc", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking yansi v0.5.1 [INFO] [stderr] Checking getrandom v0.2.11 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking 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: 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: 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: 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: 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: 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 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 `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] [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.50s [INFO] running `Command { std: "docker" "inspect" "8a937ca4f0e97ab0586cf7fe1e81d8f95050848ccd469e5c89e63a904c2122fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8a937ca4f0e97ab0586cf7fe1e81d8f95050848ccd469e5c89e63a904c2122fc", kill_on_drop: false }` [INFO] [stdout] 8a937ca4f0e97ab0586cf7fe1e81d8f95050848ccd469e5c89e63a904c2122fc