[INFO] cloning repository https://github.com/ErikBot42/aoc2024 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ErikBot42/aoc2024" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErikBot42%2Faoc2024", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErikBot42%2Faoc2024'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9ea6b0cdf311b464e437b438379f5373223cd002 [INFO] linting ErikBot42/aoc2024 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FErikBot42%2Faoc2024" "/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/ErikBot42/aoc2024 [INFO] finished tweaking git repo https://github.com/ErikBot42/aoc2024 [INFO] tweaked toml for git repo https://github.com/ErikBot42/aoc2024 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ErikBot42/aoc2024 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ErikBot42/aoc2024 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" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f5ea7235a0f6f80fa4ec408e6994ec90013414292a7b18c1aa3aee70a37bf28a [INFO] running `Command { std: "docker" "start" "-a" "f5ea7235a0f6f80fa4ec408e6994ec90013414292a7b18c1aa3aee70a37bf28a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f5ea7235a0f6f80fa4ec408e6994ec90013414292a7b18c1aa3aee70a37bf28a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f5ea7235a0f6f80fa4ec408e6994ec90013414292a7b18c1aa3aee70a37bf28a", kill_on_drop: false }` [INFO] [stdout] f5ea7235a0f6f80fa4ec408e6994ec90013414292a7b18c1aa3aee70a37bf28a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 55db7de0dc400dbf2e04a2270aa25c063f750b09ce8fe570ee7265eb9c7b5009 [INFO] running `Command { std: "docker" "start" "-a" "55db7de0dc400dbf2e04a2270aa25c063f750b09ce8fe570ee7265eb9c7b5009", kill_on_drop: false }` [INFO] [stderr] Checking aot2024 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: method `next` is never used [INFO] [stdout] --> src/bin/day5_2.rs:154:8 [INFO] [stdout] | [INFO] [stdout] 153 | impl Prng { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 154 | fn next(&mut self) -> u64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day5_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 210 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `board` [INFO] [stdout] --> src/bin/day10.rs:159:14 [INFO] [stdout] | [INFO] [stdout] 159 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 159 - for y in 0..n { [INFO] [stdout] 159 + for in board.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `board` [INFO] [stdout] --> src/bin/day10.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 160 - for x in 0..m { [INFO] [stdout] 160 + for in board.iter_mut().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/day1.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / loop { [INFO] [stdout] 156 | | let Some(line) = readllq() else { [INFO] [stdout] 157 | | break; [INFO] [stdout] 158 | | }; [INFO] [stdout] ... | [INFO] [stdout] 161 | | d2.push(str::parse(it.next().unwrap()).unwrap()); [INFO] [stdout] 162 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(line) = readllq() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day1.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 171 | outln!("{r}"); [INFO] [stdout] | ------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day10.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 173 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day7.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 169 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day7_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 169 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `d` [INFO] [stdout] --> src/bin/day9_2.rs:197:14 [INFO] [stdout] | [INFO] [stdout] 197 | for i in 0..d.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 197 - for i in 0..d.len() { [INFO] [stdout] 197 + for (i, ) in d.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day9_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 202 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2.rs:165:16 [INFO] [stdout] | [INFO] [stdout] 165 | if !(a > b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a <= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if !(a < b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day2.rs:172:17 [INFO] [stdout] | [INFO] [stdout] 172 | if !(d >= 1 && d <= 3) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=3).contains(&d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 180 | outln!("{count}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day10_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 170 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/tmpl.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | let n: usize = read(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `stdout` is never read [INFO] [stdout] --> src/bin/tmpl.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 26 | struct GlobalState { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 27 | stdout: StdoutLock<'static>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/tmpl.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/tmpl.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/tmpl.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/tmpl.rs:67:31 [INFO] [stdout] | [INFO] [stdout] 67 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/tmpl.rs:87:31 [INFO] [stdout] | [INFO] [stdout] 87 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/tmpl.rs:145:14 [INFO] [stdout] | [INFO] [stdout] 145 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/tmpl.rs:147:26 [INFO] [stdout] | [INFO] [stdout] 147 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/tmpl.rs:149:14 [INFO] [stdout] | [INFO] [stdout] 149 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/day1.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / loop { [INFO] [stdout] 156 | | let Some(line) = readllq() else { [INFO] [stdout] 157 | | break; [INFO] [stdout] 158 | | }; [INFO] [stdout] ... | [INFO] [stdout] 161 | | d2.push(str::parse(it.next().unwrap()).unwrap()); [INFO] [stdout] 162 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(line) = readllq() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day1.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 171 | outln!("{r}"); [INFO] [stdout] | ------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2_2.rs:180:12 [INFO] [stdout] | [INFO] [stdout] 180 | if !(a > b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a <= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2_2.rs:183:12 [INFO] [stdout] | [INFO] [stdout] 183 | if !(a < b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/day2_2.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 192 | let safe = increasing || decreasing; [INFO] [stdout] | ------------------------------------ unnecessary `let` binding [INFO] [stdout] 193 | safe [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 192 ~ [INFO] [stdout] 193 ~ increasing || decreasing [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day2_2.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | if !(d >= 1 && d <= 3) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=3).contains(&d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day2_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 171 | outln!("{count}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day5.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 179 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `marked` [INFO] [stdout] --> src/bin/day8.rs:186:14 [INFO] [stdout] | [INFO] [stdout] 186 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 186 - for y in 0..n { [INFO] [stdout] 186 + for in marked.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `marked` [INFO] [stdout] --> src/bin/day8.rs:187:18 [INFO] [stdout] | [INFO] [stdout] 187 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 187 - for x in 0..m { [INFO] [stdout] 187 + for in marked.iter().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day8.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 191 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `marked` [INFO] [stdout] --> src/bin/day8_2.rs:189:14 [INFO] [stdout] | [INFO] [stdout] 189 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 189 - for y in 0..n { [INFO] [stdout] 189 + for in marked.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `marked` [INFO] [stdout] --> src/bin/day8_2.rs:190:18 [INFO] [stdout] | [INFO] [stdout] 190 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 190 - for x in 0..m { [INFO] [stdout] 190 + for in marked.iter().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day8_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 194 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3.rs:196:25 [INFO] [stdout] | [INFO] [stdout] 196 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 196 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 196 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 213 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 213 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `d` [INFO] [stdout] --> src/bin/day9_2.rs:197:14 [INFO] [stdout] | [INFO] [stdout] 197 | for i in 0..d.len() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 197 - for i in 0..d.len() { [INFO] [stdout] 197 + for (i, ) in d.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day3.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 228 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day9_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 202 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day10_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 170 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `board` [INFO] [stdout] --> src/bin/day6.rs:170:14 [INFO] [stdout] | [INFO] [stdout] 170 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 170 - for y in 0..n { [INFO] [stdout] 170 + for (y, ) in board.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `board` [INFO] [stdout] --> src/bin/day6.rs:171:18 [INFO] [stdout] | [INFO] [stdout] 171 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 171 - for x in 0..m { [INFO] [stdout] 171 + for (x, ) in board.iter().enumerate().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `visited` [INFO] [stdout] --> src/bin/day6.rs:181:14 [INFO] [stdout] | [INFO] [stdout] 181 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 181 - for y in 0..n { [INFO] [stdout] 181 + for in visited.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `visited` [INFO] [stdout] --> src/bin/day6.rs:182:18 [INFO] [stdout] | [INFO] [stdout] 182 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 182 - for x in 0..m { [INFO] [stdout] 182 + for in visited.iter().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day6.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day6.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day6.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 186 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day7.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 169 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3_2.rs:214:29 [INFO] [stdout] | [INFO] [stdout] 214 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 214 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 214 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3_2.rs:225:29 [INFO] [stdout] | [INFO] [stdout] 225 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 225 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 225 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day3_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 240 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> src/bin/day6_2.rs:271:11 [INFO] [stdout] | [INFO] [stdout] 271 | } else { [INFO] [stdout] | ___________^ [INFO] [stdout] 272 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3.rs:196:25 [INFO] [stdout] | [INFO] [stdout] 196 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 196 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 196 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `marked` [INFO] [stdout] --> src/bin/day8.rs:186:14 [INFO] [stdout] | [INFO] [stdout] 186 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 186 - for y in 0..n { [INFO] [stdout] 186 + for in marked.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `marked` [INFO] [stdout] --> src/bin/day8.rs:187:18 [INFO] [stdout] | [INFO] [stdout] 187 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 187 - for x in 0..m { [INFO] [stdout] 187 + for in marked.iter().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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: manual check for common ascii range [INFO] [stdout] --> src/bin/day3.rs:213:25 [INFO] [stdout] | [INFO] [stdout] 213 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 213 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 213 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day3.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 228 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 191 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/bin/day4.rs:159:14 [INFO] [stdout] | [INFO] [stdout] 159 | for i in 0..board.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 159 - for i in 0..board.len() { [INFO] [stdout] 159 + for in &mut board { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `word` [INFO] [stdout] --> src/bin/day4.rs:210:22 [INFO] [stdout] | [INFO] [stdout] 210 | for i in 0..word.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 210 - for i in 0..word.len() { [INFO] [stdout] 210 + for in &word { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day4.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 191 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2.rs:165:16 [INFO] [stdout] | [INFO] [stdout] 165 | if !(a > b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a <= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | if !(a < b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day2.rs:172:17 [INFO] [stdout] | [INFO] [stdout] 172 | if !(d >= 1 && d <= 3) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=3).contains(&d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 180 | outln!("{count}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2_2.rs:180:12 [INFO] [stdout] | [INFO] [stdout] 180 | if !(a > b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a <= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day2_2.rs:183:12 [INFO] [stdout] | [INFO] [stdout] 183 | if !(a < b) { [INFO] [stdout] | ^^^^^^^^ help: try: `(a >= b)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/day2_2.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 192 | let safe = increasing || decreasing; [INFO] [stdout] | ------------------------------------ unnecessary `let` binding [INFO] [stdout] 193 | safe [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 192 ~ [INFO] [stdout] 193 ~ increasing || decreasing [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/bin/day2_2.rs:187:13 [INFO] [stdout] | [INFO] [stdout] 187 | if !(d >= 1 && d <= 3) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: use: `(1..=3).contains(&d)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day2_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day2_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day2_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day2_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day2_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 171 | outln!("{count}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `board` [INFO] [stdout] --> src/bin/day6_2.rs:170:14 [INFO] [stdout] | [INFO] [stdout] 170 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 170 - for y in 0..n { [INFO] [stdout] 170 + for (y, ) in board.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `board` [INFO] [stdout] --> src/bin/day6_2.rs:171:18 [INFO] [stdout] | [INFO] [stdout] 171 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 171 - for x in 0..m { [INFO] [stdout] 171 + for (x, ) in board.iter().enumerate().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/bin/day4.rs:159:14 [INFO] [stdout] | [INFO] [stdout] 159 | for i in 0..board.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 159 - for i in 0..board.len() { [INFO] [stdout] 159 + for in &mut board { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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: the loop variable `i` is only used to index `word` [INFO] [stdout] --> src/bin/day4.rs:210:22 [INFO] [stdout] | [INFO] [stdout] 210 | for i in 0..word.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 210 - for i in 0..word.len() { [INFO] [stdout] 210 + for in &word { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day4.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 191 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day6_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day6_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 180 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `else` branch is empty [INFO] [stdout] --> src/bin/day6_2.rs:271:11 [INFO] [stdout] | [INFO] [stdout] 271 | } else { [INFO] [stdout] | ___________^ [INFO] [stdout] 272 | | } [INFO] [stdout] | |_________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_else [INFO] [stdout] = note: `#[warn(clippy::needless_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/day1_2.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | / loop { [INFO] [stdout] 157 | | let Some(line) = readllq() else { [INFO] [stdout] 158 | | break; [INFO] [stdout] 159 | | }; [INFO] [stdout] ... | [INFO] [stdout] 162 | | d2.push(str::parse(it.next().unwrap()).unwrap()); [INFO] [stdout] 163 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(line) = readllq() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/day4_2.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | for i in 0..word.len() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day7_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day7_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day7_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day7_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day7_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 169 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day5.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day1_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 179 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/bin/day4_2.rs:159:14 [INFO] [stdout] | [INFO] [stdout] 159 | for i in 0..board.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 159 - for i in 0..board.len() { [INFO] [stdout] 159 + for in &mut board { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 175 | outln!("{s}"); [INFO] [stdout] | ------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `word` [INFO] [stdout] --> src/bin/day4_2.rs:195:26 [INFO] [stdout] | [INFO] [stdout] 195 | for i in 0..word.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 195 - for i in 0..word.len() { [INFO] [stdout] 195 + for in &word { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day4_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 243 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `board` [INFO] [stdout] --> src/bin/day6_2.rs:170:14 [INFO] [stdout] | [INFO] [stdout] 170 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 170 - for y in 0..n { [INFO] [stdout] 170 + for (y, ) in board.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `board` [INFO] [stdout] --> src/bin/day6_2.rs:171:18 [INFO] [stdout] | [INFO] [stdout] 171 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 171 - for x in 0..m { [INFO] [stdout] 171 + for (x, ) in board.iter().enumerate().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day9.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 190 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/bin/tmpl.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | let n: usize = read(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `stdout` is never read [INFO] [stdout] --> src/bin/tmpl.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 26 | struct GlobalState { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 27 | stdout: StdoutLock<'static>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day9.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day9.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day9.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day9.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day9.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 190 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/tmpl.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day6_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day6_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/tmpl.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/tmpl.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/tmpl.rs:67:31 [INFO] [stdout] | [INFO] [stdout] 67 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/tmpl.rs:87:31 [INFO] [stdout] | [INFO] [stdout] 87 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/tmpl.rs:145:14 [INFO] [stdout] | [INFO] [stdout] 145 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/tmpl.rs:147:26 [INFO] [stdout] | [INFO] [stdout] 147 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/tmpl.rs:149:14 [INFO] [stdout] | [INFO] [stdout] 149 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 180 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `marked` [INFO] [stdout] --> src/bin/day8_2.rs:189:14 [INFO] [stdout] | [INFO] [stdout] 189 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 189 - for y in 0..n { [INFO] [stdout] 189 + for in marked.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `marked` [INFO] [stdout] --> src/bin/day8_2.rs:190:18 [INFO] [stdout] | [INFO] [stdout] 190 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 190 - for x in 0..m { [INFO] [stdout] 190 + for in marked.iter().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day8_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day8_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day8_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day8_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day8_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 194 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/bin/day1_2.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | / loop { [INFO] [stdout] 157 | | let Some(line) = readllq() else { [INFO] [stdout] 158 | | break; [INFO] [stdout] 159 | | }; [INFO] [stdout] ... | [INFO] [stdout] 162 | | d2.push(str::parse(it.next().unwrap()).unwrap()); [INFO] [stdout] 163 | | } [INFO] [stdout] | |_____^ help: try: `while let Some(line) = readllq() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` is never used [INFO] [stdout] --> src/bin/day5_2.rs:154:8 [INFO] [stdout] | [INFO] [stdout] 153 | impl Prng { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 154 | fn next(&mut self) -> u64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day1_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day1_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day1_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day1_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day1_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 175 | outln!("{s}"); [INFO] [stdout] | ------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day5_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day5_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day5_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day5_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day5_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 210 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is used to index `board` [INFO] [stdout] --> src/bin/day6.rs:170:14 [INFO] [stdout] | [INFO] [stdout] 170 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 170 - for y in 0..n { [INFO] [stdout] 170 + for (y, ) in board.iter().enumerate().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is used to index `board` [INFO] [stdout] --> src/bin/day6.rs:171:18 [INFO] [stdout] | [INFO] [stdout] 171 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 171 - for x in 0..m { [INFO] [stdout] 171 + for (x, ) in board.iter().enumerate().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `visited` [INFO] [stdout] --> src/bin/day6.rs:181:14 [INFO] [stdout] | [INFO] [stdout] 181 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 181 - for y in 0..n { [INFO] [stdout] 181 + for in visited.iter().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `x` is only used to index `visited` [INFO] [stdout] --> src/bin/day6.rs:182:18 [INFO] [stdout] | [INFO] [stdout] 182 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 182 - for x in 0..m { [INFO] [stdout] 182 + for in visited.iter().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day6.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day6.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day6.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day6.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day6.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day6.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 186 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/day4_2.rs:211:25 [INFO] [stdout] | [INFO] [stdout] 211 | for i in 0..word.len() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/bin/day4_2.rs:159:14 [INFO] [stdout] | [INFO] [stdout] 159 | for i in 0..board.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 159 - for i in 0..board.len() { [INFO] [stdout] 159 + for in &mut board { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `word` [INFO] [stdout] --> src/bin/day4_2.rs:195:26 [INFO] [stdout] | [INFO] [stdout] 195 | for i in 0..word.len() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 195 - for i in 0..word.len() { [INFO] [stdout] 195 + for in &word { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day4_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day4_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day4_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day4_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day4_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 243 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3_2.rs:214:29 [INFO] [stdout] | [INFO] [stdout] 214 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] = note: `#[warn(clippy::manual_is_ascii_check)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 214 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 214 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual check for common ascii range [INFO] [stdout] --> src/bin/day3_2.rs:225:29 [INFO] [stdout] | [INFO] [stdout] 225 | while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_ascii_check [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 225 - while i != n && matches!(s[i], b'0'..=b'9') { [INFO] [stdout] 225 + while i != n && s[i].is_ascii_digit() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3_2.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `y` is only used to index `board` [INFO] [stdout] --> src/bin/day10.rs:159:14 [INFO] [stdout] | [INFO] [stdout] 159 | for y in 0..n { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 159 - for y in 0..n { [INFO] [stdout] 159 + for in board.iter_mut().take(n) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3_2.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3_2.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3_2.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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: the loop variable `x` is only used to index `board` [INFO] [stdout] --> src/bin/day10.rs:160:18 [INFO] [stdout] | [INFO] [stdout] 160 | for x in 0..m { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 160 - for x in 0..m { [INFO] [stdout] 160 + for in board.iter_mut().take(m) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day3_2.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day3_2.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day3_2.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day3_2.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day3_2.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 240 | outln!("{sum}"); [INFO] [stdout] | --------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | match unsafe { LINE_ITER.assume_init_mut() }.next() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/bin/day10.rs:47:38 [INFO] [stdout] | [INFO] [stdout] 47 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10.rs:50:26 [INFO] [stdout] | [INFO] [stdout] 50 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10.rs:86:31 [INFO] [stdout] | [INFO] [stdout] 86 | let stdin = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdin }; [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/bin/day10.rs:144:14 [INFO] [stdout] | [INFO] [stdout] 144 | unsafe { GLOBAL_STATE.write(global_state) }; [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/bin/day10.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | let state = unsafe { GLOBAL_STATE.assume_init_mut() }; [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/bin/day10.rs:148:14 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { LINE_ITER.write(state.line_buffer.split_whitespace()) }; [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/bin/day10.rs:106:36 [INFO] [stdout] | [INFO] [stdout] 106 | let stdout = unsafe { &mut GLOBAL_STATE.assume_init_mut().stdout }; [INFO] [stdout] | ^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] ... [INFO] [stdout] 173 | outln!("{total}"); [INFO] [stdout] | ----------------- in this macro invocation [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] = note: this warning originates in the macro `outln` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.48s [INFO] running `Command { std: "docker" "inspect" "55db7de0dc400dbf2e04a2270aa25c063f750b09ce8fe570ee7265eb9c7b5009", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "55db7de0dc400dbf2e04a2270aa25c063f750b09ce8fe570ee7265eb9c7b5009", kill_on_drop: false }` [INFO] [stdout] 55db7de0dc400dbf2e04a2270aa25c063f750b09ce8fe570ee7265eb9c7b5009