[INFO] cloning repository https://github.com/kidskoding/ci210-word-game [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kidskoding/ci210-word-game" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkidskoding%2Fci210-word-game", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkidskoding%2Fci210-word-game'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d05287d291de52c4b2a20d3e315c5e45f86c8eb4 [INFO] checking kidskoding/ci210-word-game against eca445e5ae4a6679cc27d3a09106ce245e13a5a6 for pr-162478 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkidskoding%2Fci210-word-game" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/kidskoding/ci210-word-game [INFO] finished tweaking git repo https://github.com/kidskoding/ci210-word-game [INFO] tweaked toml for git repo https://github.com/kidskoding/ci210-word-game written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/kidskoding/ci210-word-game on toolchain eca445e5ae4a6679cc27d3a09106ce245e13a5a6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Locking 59 packages to highest compatible versions [INFO] [stderr] Adding rand v0.8.8 (available: v0.10.2) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded miniquad v0.4.11 [INFO] [stderr] Downloaded fontdue v0.9.4 [INFO] [stderr] Downloaded macroquad v0.4.16 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,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" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:8683fc1fc2eb5c9ac98e0d076ab094b2ffac7f99da555d2b6a2e27f346de2ec7" "sleep" "infinity", kill_on_drop: false }` [INFO] [stdout] 7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f [INFO] running `Command { std: "docker" "start" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f" "/opt/rustwide/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-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" "-w" "/opt/rustwide/workdir" "--user" "0:0" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f" "/opt/rustwide/cargo-home/bin/cargo" "+eca445e5ae4a6679cc27d3a09106ce245e13a5a6" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] Compiling crc32fast v1.5.2 [INFO] [stderr] Compiling proc-macro2 v1.0.107 [INFO] [stderr] Compiling quote v1.0.47 [INFO] [stderr] Compiling zerocopy v0.8.57 [INFO] [stderr] Compiling serde_core v1.0.229 [INFO] [stderr] Compiling miniquad v0.4.11 [INFO] [stderr] Checking miniz_oxide v0.9.1 [INFO] [stderr] Compiling serde v1.0.229 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking quad-rand v0.2.3 [INFO] [stderr] Checking glam v0.27.0 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling macroquad_macro v0.1.8 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking flate2 v1.1.10 [INFO] [stderr] Compiling syn v3.0.5 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking fontdue v0.9.4 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Compiling serde_derive v1.0.229 [INFO] [stderr] Checking macroquad v0.4.16 [INFO] [stderr] Checking serde_json v1.0.151 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.8 [INFO] [stderr] Checking ci210-word-game v1.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `RED` [INFO] [stdout] --> src/round_win_screen.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use macroquad::color::{BLACK, GREEN, RED, WHITE}; [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: `RED` [INFO] [stdout] --> src/win_screen.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use macroquad::color::{BLACK, GREEN, RED, WHITE}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RED` [INFO] [stdout] --> src/round_win_screen.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use macroquad::color::{BLACK, GREEN, RED, WHITE}; [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: `RED` [INFO] [stdout] --> src/win_screen.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use macroquad::color::{BLACK, GREEN, RED, WHITE}; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/game.rs:351:9 [INFO] [stdout] | [INFO] [stdout] 351 | for r in 0..3 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/game.rs:365:9 [INFO] [stdout] | [INFO] [stdout] 365 | let mut tiles = &mut game_state.tiles; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_x`, `get_y`, `get_width`, and `get_height` are never used [INFO] [stdout] --> src/ui/button.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Button { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 50 | pub fn get_x(&self) -> f32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn get_y(&self) -> f32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn get_width(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn get_height(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `filtered_words` is never read [INFO] [stdout] --> src/game.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 16 | struct GameState { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 28 | filtered_words: HashSet, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/game.rs:351:9 [INFO] [stdout] | [INFO] [stdout] 351 | for r in 0..3 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/game.rs:365:9 [INFO] [stdout] | [INFO] [stdout] 365 | let mut tiles = &mut game_state.tiles; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `game_state` should have an upper case name [INFO] [stdout] --> src/game.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static mut GAME_STATE: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:113:35 [INFO] [stdout] | [INFO] [stdout] 113 | let letter_dim = measure_text(&game_state.current_word, None, 40, 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 113 | let letter_dim = measure_text(&raw const game_state.current_word, None, 40, 1.0); [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | &game_state.current_word, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 115 | &raw const game_state.current_word, [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:133:8 [INFO] [stdout] | [INFO] [stdout] 133 | if game_state.current_word.len() != 0 && (play_button.is_clicked() || is_key_pressed(KeyCode::Enter)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:209:10 [INFO] [stdout] | [INFO] [stdout] 209 | &game_state.round_score.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:211:29 [INFO] [stdout] | [INFO] [stdout] 211 | - measure_text(&game_state.round_score.to_string(), None, 40, 1.0).width / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:234:10 [INFO] [stdout] | [INFO] [stdout] 234 | &game_state.total_score.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:236:29 [INFO] [stdout] | [INFO] [stdout] 236 | - measure_text(&game_state.total_score.to_string(), None, 120, 1.0).width / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:238:29 [INFO] [stdout] | [INFO] [stdout] 238 | - measure_text(&game_state.total_score.to_string(), None, 120, 1.0).height / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:260:10 [INFO] [stdout] | [INFO] [stdout] 260 | &game_state.words_remaining.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:261:45 [INFO] [stdout] | [INFO] [stdout] 261 | 175.0 + 125.0 / 2.0 - measure_text(&game_state.words_remaining.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:283:14 [INFO] [stdout] | [INFO] [stdout] 283 | let d = &game_state.discards.to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:307:10 [INFO] [stdout] | [INFO] [stdout] 307 | &game_state.round.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:308:52 [INFO] [stdout] | [INFO] [stdout] 308 | 350.0 - 90.0 + 125.0 / 2.0 - measure_text(&game_state.round.to_string(), None, 50, 1.0).width / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:316:17 [INFO] [stdout] | [INFO] [stdout] 316 | let tiles = &mut game_state.tiles; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 316 | let tiles = &raw mut game_state.tiles; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:323:47 [INFO] [stdout] | [INFO] [stdout] 323 | let rand_index = rng.gen_range(0..game_state.words.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:333:49 [INFO] [stdout] | [INFO] [stdout] 333 | let tile = ui::tile::Tile::new(*game_state.words.get(rand_indexes[inc * 4 + c]).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:343:17 [INFO] [stdout] | [INFO] [stdout] 343 | for tile in &game_state.tiles { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 343 | for tile in &raw const game_state.tiles { [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:365:21 [INFO] [stdout] | [INFO] [stdout] 365 | let mut tiles = &mut game_state.tiles; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 365 | let mut tiles = &raw mut game_state.tiles; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:375:9 [INFO] [stdout] | [INFO] [stdout] 375 | game_state.tiles.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/game.rs:382:5 [INFO] [stdout] | [INFO] [stdout] 382 | &game_state.current_word.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 382 | let _ = &game_state.current_word.clear(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:382:6 [INFO] [stdout] | [INFO] [stdout] 382 | &game_state.current_word.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:387:20 [INFO] [stdout] | [INFO] [stdout] 387 | let word = &game_state.current_word; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 387 | let word = &raw const game_state.current_word; [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:389:12 [INFO] [stdout] | [INFO] [stdout] 389 | if game_state.words_db.contains(word) && !game_state.guessed_words.contains(word) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:389:51 [INFO] [stdout] | [INFO] [stdout] 389 | if game_state.words_db.contains(word) && !game_state.guessed_words.contains(word) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:393:26 [INFO] [stdout] | [INFO] [stdout] 393 | score += game_state.scoring.get(&char).unwrap_or(&0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | game_state.guessed_words.insert(word.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:406:17 [INFO] [stdout] | [INFO] [stdout] 406 | for tile in &mut game_state.tiles { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 406 | for tile in &raw mut game_state.tiles { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:410:17 [INFO] [stdout] | [INFO] [stdout] 410 | game_state.current_word.push(tile_letter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_x`, `get_y`, `get_width`, and `get_height` are never used [INFO] [stdout] --> src/ui/button.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl Button { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 50 | pub fn get_x(&self) -> f32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 53 | pub fn get_y(&self) -> f32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 56 | pub fn get_width(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | pub fn get_height(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `filtered_words` is never read [INFO] [stdout] --> src/game.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 16 | struct GameState { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 28 | filtered_words: HashSet, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `game_state` should have an upper case name [INFO] [stdout] --> src/game.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] help: convert the identifier to upper case [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static mut GAME_STATE: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:113:35 [INFO] [stdout] | [INFO] [stdout] 113 | let letter_dim = measure_text(&game_state.current_word, None, 40, 1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 113 | let letter_dim = measure_text(&raw const game_state.current_word, None, 40, 1.0); [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | &game_state.current_word, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 115 | &raw const game_state.current_word, [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:133:8 [INFO] [stdout] | [INFO] [stdout] 133 | if game_state.current_word.len() != 0 && (play_button.is_clicked() || is_key_pressed(KeyCode::Enter)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:209:10 [INFO] [stdout] | [INFO] [stdout] 209 | &game_state.round_score.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:211:29 [INFO] [stdout] | [INFO] [stdout] 211 | - measure_text(&game_state.round_score.to_string(), None, 40, 1.0).width / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:234:10 [INFO] [stdout] | [INFO] [stdout] 234 | &game_state.total_score.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:236:29 [INFO] [stdout] | [INFO] [stdout] 236 | - measure_text(&game_state.total_score.to_string(), None, 120, 1.0).width / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:238:29 [INFO] [stdout] | [INFO] [stdout] 238 | - measure_text(&game_state.total_score.to_string(), None, 120, 1.0).height / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:260:10 [INFO] [stdout] | [INFO] [stdout] 260 | &game_state.words_remaining.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:261:45 [INFO] [stdout] | [INFO] [stdout] 261 | 175.0 + 125.0 / 2.0 - measure_text(&game_state.words_remaining.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:283:14 [INFO] [stdout] | [INFO] [stdout] 283 | let d = &game_state.discards.to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:307:10 [INFO] [stdout] | [INFO] [stdout] 307 | &game_state.round.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:308:52 [INFO] [stdout] | [INFO] [stdout] 308 | 350.0 - 90.0 + 125.0 / 2.0 - measure_text(&game_state.round.to_string(), None, 50, 1.0).width / 2.0, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:316:17 [INFO] [stdout] | [INFO] [stdout] 316 | let tiles = &mut game_state.tiles; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 316 | let tiles = &raw mut game_state.tiles; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:323:47 [INFO] [stdout] | [INFO] [stdout] 323 | let rand_index = rng.gen_range(0..game_state.words.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:333:49 [INFO] [stdout] | [INFO] [stdout] 333 | let tile = ui::tile::Tile::new(*game_state.words.get(rand_indexes[inc * 4 + c]).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:343:17 [INFO] [stdout] | [INFO] [stdout] 343 | for tile in &game_state.tiles { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 343 | for tile in &raw const game_state.tiles { [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:365:21 [INFO] [stdout] | [INFO] [stdout] 365 | let mut tiles = &mut game_state.tiles; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 365 | let mut tiles = &raw mut game_state.tiles; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:375:9 [INFO] [stdout] | [INFO] [stdout] 375 | game_state.tiles.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/game.rs:382:5 [INFO] [stdout] | [INFO] [stdout] 382 | &game_state.current_word.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 382 | let _ = &game_state.current_word.clear(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:382:6 [INFO] [stdout] | [INFO] [stdout] 382 | &game_state.current_word.clear(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:387:20 [INFO] [stdout] | [INFO] [stdout] 387 | let word = &game_state.current_word; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 387 | let word = &raw const game_state.current_word; [INFO] [stdout] | +++++++++ [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:389:12 [INFO] [stdout] | [INFO] [stdout] 389 | if game_state.words_db.contains(word) && !game_state.guessed_words.contains(word) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:389:51 [INFO] [stdout] | [INFO] [stdout] 389 | if game_state.words_db.contains(word) && !game_state.guessed_words.contains(word) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/game.rs:393:26 [INFO] [stdout] | [INFO] [stdout] 393 | score += game_state.scoring.get(&char).unwrap_or(&0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable when borrowed with a shared reference [INFO] [stdout] | [INFO] [stdout] 13 - static mut game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] 13 + static game_state: Lazy = Lazy::new(|| GameState::new()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | game_state.guessed_words.insert(word.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:406:17 [INFO] [stdout] | [INFO] [stdout] 406 | for tile in &mut game_state.tiles { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 406 | for tile in &raw mut game_state.tiles { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/game.rs:410:17 [INFO] [stdout] | [INFO] [stdout] 410 | game_state.current_word.push(tile_letter); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: unused dependency `serde` [INFO] [stderr] --> Cargo.toml:8:15 [INFO] [stderr] | [INFO] [stderr] 8 | [dependencies.serde] [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `cargo::unused_dependencies` is set to `warn` by default [INFO] [stderr] help: consider removing the dependency on `serde` [INFO] [stderr] warning: `ci210-word-game` (manifest) generated 1 warning [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.12s [INFO] running `Command { std: "docker" "inspect" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f", kill_on_drop: false }` [INFO] [stdout] 7e2086694e9bc2e120116513c40f0f554392e774d382f47731c4e64e24a34c4f