[INFO] cloning repository https://github.com/Stratus51/coding_games_ocean_of_code [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Stratus51/coding_games_ocean_of_code" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FStratus51%2Fcoding_games_ocean_of_code", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FStratus51%2Fcoding_games_ocean_of_code'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] eb7a492144672defb4403fa87aaa6c4abf7aeb28 [INFO] building Stratus51/coding_games_ocean_of_code against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FStratus51%2Fcoding_games_ocean_of_code" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Stratus51/coding_games_ocean_of_code on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/Stratus51/coding_games_ocean_of_code [INFO] finished tweaking git repo https://github.com/Stratus51/coding_games_ocean_of_code [INFO] tweaked toml for git repo https://github.com/Stratus51/coding_games_ocean_of_code written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/Stratus51/coding_games_ocean_of_code already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e43d3ffb43ab6f21f6fa701bbf17c650b4bdc5c491510c8fcc69bf8784bed7a5 [INFO] running `Command { std: "docker" "start" "-a" "e43d3ffb43ab6f21f6fa701bbf17c650b4bdc5c491510c8fcc69bf8784bed7a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e43d3ffb43ab6f21f6fa701bbf17c650b4bdc5c491510c8fcc69bf8784bed7a5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e43d3ffb43ab6f21f6fa701bbf17c650b4bdc5c491510c8fcc69bf8784bed7a5", kill_on_drop: false }` [INFO] [stdout] e43d3ffb43ab6f21f6fa701bbf17c650b4bdc5c491510c8fcc69bf8784bed7a5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail-expr-drop-order" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 3c61b74d4d4de6fadb842d05e74c408093b9a87cec4386505548445db642bf08 [INFO] running `Command { std: "docker" "start" "-a" "3c61b74d4d4de6fadb842d05e74c408093b9a87cec4386505548445db642bf08", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.68 [INFO] [stderr] Compiling getrandom v0.1.14 [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Compiling coding_games_ocean_of_code v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:510:13 [INFO] [stdout] | [INFO] [stdout] 510 | for i in 0..size { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sonar_result` [INFO] [stdout] --> src/main.rs:1242:13 [INFO] [stdout] | [INFO] [stdout] 1242 | let sonar_result = input_line.trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sonar_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NB_SECTORS` is never used [INFO] [stdout] --> src/main.rs:19:7 [INFO] [stdout] | [INFO] [stdout] 19 | const NB_SECTORS: usize = 9; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Sonar` and `Mine` are never constructed [INFO] [stdout] --> src/main.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 102 | enum System { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 103 | Torpedo, [INFO] [stdout] 104 | Sonar, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 105 | Silence, [INFO] [stdout] 106 | Mine, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `System` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `parse` is never used [INFO] [stdout] --> src/main.rs:123:8 [INFO] [stdout] | [INFO] [stdout] 122 | impl System { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 123 | fn parse(s: &str) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nb_true_bits` is never used [INFO] [stdout] --> src/main.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn nb_true_bits(n: u16) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nb_false_bits` is never used [INFO] [stdout] --> src/main.rs:149:4 [INFO] [stdout] | [INFO] [stdout] 149 | fn nb_false_bits(n: u16) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TRUE_BITS` is never used [INFO] [stdout] --> src/main.rs:158:12 [INFO] [stdout] | [INFO] [stdout] 158 | static mut TRUE_BITS: [u8; 128] = [0; 128]; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `FALSE_BITS` is never used [INFO] [stdout] --> src/main.rs:159:12 [INFO] [stdout] | [INFO] [stdout] 159 | static mut FALSE_BITS: [u8; 128] = [0; 128]; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `init_maps` is never used [INFO] [stdout] --> src/main.rs:161:11 [INFO] [stdout] | [INFO] [stdout] 161 | unsafe fn init_maps() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/main.rs:179:8 [INFO] [stdout] | [INFO] [stdout] 173 | impl NewMap { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 179 | fn set(&mut self, pos: Pos, value: bool) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | fn get(&self, pos: Pos) -> bool { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 186 | fn copy_from(&mut self, map: &NewMap) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 190 | fn shift(&mut self, dir: &Direction, n: usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 213 | fn ipos_shift(&mut self, pos_shift: IPos) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 228 | fn first_match(&self, value: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 253 | fn count(&self, value: bool) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 269 | fn compose(&self, map: &NewMap, map_offset: &Pos) -> NewMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `eq_or` and `reset` are never used [INFO] [stdout] --> src/main.rs:389:8 [INFO] [stdout] | [INFO] [stdout] 336 | impl Map { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 389 | fn eq_or(&mut self, map: &Map) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 399 | fn reset(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `dist` and `isub` are never used [INFO] [stdout] --> src/main.rs:715:8 [INFO] [stdout] | [INFO] [stdout] 714 | impl Pos { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] 715 | fn dist(&self, rhs: &Pos) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 719 | fn isub(&self, rhs: &Self) -> IPos { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IPos` is never constructed [INFO] [stdout] --> src/main.rs:727:8 [INFO] [stdout] | [INFO] [stdout] 727 | struct IPos { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OffCenteredMap` is never constructed [INFO] [stdout] --> src/main.rs:736:8 [INFO] [stdout] | [INFO] [stdout] 736 | struct OffCenteredMap { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:741:14 [INFO] [stdout] | [INFO] [stdout] 740 | impl OffCenteredMap { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 741 | const fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SECTOR_MASK` is never used [INFO] [stdout] --> src/main.rs:749:12 [INFO] [stdout] | [INFO] [stdout] 749 | static mut SECTOR_MASK: [NewMap; NB_SECTORS] = [NewMap::new(); NB_SECTORS]; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TORPEDO_RANGE_MAP` is never used [INFO] [stdout] --> src/main.rs:750:12 [INFO] [stdout] | [INFO] [stdout] 750 | static mut TORPEDO_RANGE_MAP: OffCenteredMap = OffCenteredMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TORPEDO_SIDE_HIT_MAP` is never used [INFO] [stdout] --> src/main.rs:751:12 [INFO] [stdout] | [INFO] [stdout] 751 | static mut TORPEDO_SIDE_HIT_MAP: OffCenteredMap = OffCenteredMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SILENCE_RANGE_MAP` is never used [INFO] [stdout] --> src/main.rs:752:12 [INFO] [stdout] | [INFO] [stdout] 752 | static mut SILENCE_RANGE_MAP: OffCenteredMap = OffCenteredMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `init_game_maps` is never used [INFO] [stdout] --> src/main.rs:754:11 [INFO] [stdout] | [INFO] [stdout] 754 | unsafe fn init_game_maps() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `FuzzyPos` is never used [INFO] [stdout] --> src/main.rs:803:6 [INFO] [stdout] | [INFO] [stdout] 803 | enum FuzzyPos { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PosData` is never constructed [INFO] [stdout] --> src/main.rs:809:8 [INFO] [stdout] | [INFO] [stdout] 809 | struct PosData { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `analyse_action`, and `analyse_actions` are never used [INFO] [stdout] --> src/main.rs:822:8 [INFO] [stdout] | [INFO] [stdout] 821 | impl PosData { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 822 | fn new(water_map: NewMap) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 831 | fn analyse_action(&mut self, action: &OppAction) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 882 | fn analyse_actions(&mut self, actions: &[OppAction]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MeAction` is never used [INFO] [stdout] --> src/main.rs:974:6 [INFO] [stdout] | [INFO] [stdout] 974 | enum MeAction { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `into_opp_action` is never used [INFO] [stdout] --> src/main.rs:998:8 [INFO] [stdout] | [INFO] [stdout] 997 | impl MeAction { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 998 | fn into_opp_action(&self, current_sector: usize) -> OppAction { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OppAction` is never used [INFO] [stdout] --> src/main.rs:1013:6 [INFO] [stdout] | [INFO] [stdout] 1013 | enum OppAction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `parse` is never used [INFO] [stdout] --> src/main.rs:1021:8 [INFO] [stdout] | [INFO] [stdout] 1020 | impl OppAction { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 1021 | fn parse(s: &str) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `torpedo` is never used [INFO] [stdout] --> src/main.rs:1278:8 [INFO] [stdout] | [INFO] [stdout] 1153 | impl Game { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1278 | fn torpedo(&mut self, pos: Pos) -> Result<(), ()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:756:21 [INFO] [stdout] | [INFO] [stdout] 756 | for (i, map) in SECTOR_MASK.iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:771:25 [INFO] [stdout] | [INFO] [stdout] 771 | if pos.dist(&TORPEDO_RANGE_MAP.offset) <= 4 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 771 | if pos.dist(&raw const TORPEDO_RANGE_MAP.offset) <= 4 { [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:772:17 [INFO] [stdout] | [INFO] [stdout] 772 | TORPEDO_RANGE_MAP.map.set(pos, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:783:17 [INFO] [stdout] | [INFO] [stdout] 783 | TORPEDO_RANGE_MAP.map.set(pos, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:791:9 [INFO] [stdout] | [INFO] [stdout] 791 | SILENCE_RANGE_MAP.map.set(Pos { y: 4, x: i }, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:792:9 [INFO] [stdout] | [INFO] [stdout] 792 | SILENCE_RANGE_MAP.map.set(Pos { y: i, x: 4 }, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:845:50 [INFO] [stdout] | [INFO] [stdout] 845 | ... let shift = pos.isub(&TORPEDO_RANGE_MAP.offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 845 | let shift = pos.isub(&raw const TORPEDO_RANGE_MAP.offset); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:846:40 [INFO] [stdout] | [INFO] [stdout] 846 | ... let mask = TORPEDO_RANGE_MAP.map.clone().ipos_shift(shift); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:850:41 [INFO] [stdout] | [INFO] [stdout] 850 | ... map.compose(&SILENCE_RANGE_MAP.map, &SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 850 | map.compose(&raw const SILENCE_RANGE_MAP.map, &SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:850:65 [INFO] [stdout] | [INFO] [stdout] 850 | ... map.compose(&SILENCE_RANGE_MAP.map, &SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 850 | map.compose(&SILENCE_RANGE_MAP.map, &raw const SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:868:49 [INFO] [stdout] | [INFO] [stdout] 868 | map.ipos_shift(pos.isub(&SILENCE_RANGE_MAP.offset)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 868 | map.ipos_shift(pos.isub(&raw const SILENCE_RANGE_MAP.offset)); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.21s [INFO] running `Command { std: "docker" "inspect" "3c61b74d4d4de6fadb842d05e74c408093b9a87cec4386505548445db642bf08", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3c61b74d4d4de6fadb842d05e74c408093b9a87cec4386505548445db642bf08", kill_on_drop: false }` [INFO] [stdout] 3c61b74d4d4de6fadb842d05e74c408093b9a87cec4386505548445db642bf08 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail-expr-drop-order" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0f3ef62a3db2ffde1f167114e184e1f8a09156bd80dc1bd60fcb12ae504a134f [INFO] running `Command { std: "docker" "start" "-a" "0f3ef62a3db2ffde1f167114e184e1f8a09156bd80dc1bd60fcb12ae504a134f", kill_on_drop: false }` [INFO] [stderr] Compiling coding_games_ocean_of_code v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:510:13 [INFO] [stdout] | [INFO] [stdout] 510 | for i in 0..size { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sonar_result` [INFO] [stdout] --> src/main.rs:1242:13 [INFO] [stdout] | [INFO] [stdout] 1242 | let sonar_result = input_line.trim().to_string(); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sonar_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NB_SECTORS` is never used [INFO] [stdout] --> src/main.rs:19:7 [INFO] [stdout] | [INFO] [stdout] 19 | const NB_SECTORS: usize = 9; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Sonar` and `Mine` are never constructed [INFO] [stdout] --> src/main.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 102 | enum System { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 103 | Torpedo, [INFO] [stdout] 104 | Sonar, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 105 | Silence, [INFO] [stdout] 106 | Mine, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `System` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `parse` is never used [INFO] [stdout] --> src/main.rs:123:8 [INFO] [stdout] | [INFO] [stdout] 122 | impl System { [INFO] [stdout] | ----------- associated function in this implementation [INFO] [stdout] 123 | fn parse(s: &str) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nb_true_bits` is never used [INFO] [stdout] --> src/main.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn nb_true_bits(n: u16) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `nb_false_bits` is never used [INFO] [stdout] --> src/main.rs:149:4 [INFO] [stdout] | [INFO] [stdout] 149 | fn nb_false_bits(n: u16) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TRUE_BITS` is never used [INFO] [stdout] --> src/main.rs:158:12 [INFO] [stdout] | [INFO] [stdout] 158 | static mut TRUE_BITS: [u8; 128] = [0; 128]; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `FALSE_BITS` is never used [INFO] [stdout] --> src/main.rs:159:12 [INFO] [stdout] | [INFO] [stdout] 159 | static mut FALSE_BITS: [u8; 128] = [0; 128]; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `init_maps` is never used [INFO] [stdout] --> src/main.rs:161:11 [INFO] [stdout] | [INFO] [stdout] 161 | unsafe fn init_maps() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/main.rs:179:8 [INFO] [stdout] | [INFO] [stdout] 173 | impl NewMap { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 179 | fn set(&mut self, pos: Pos, value: bool) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 183 | fn get(&self, pos: Pos) -> bool { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 186 | fn copy_from(&mut self, map: &NewMap) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 190 | fn shift(&mut self, dir: &Direction, n: usize) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 213 | fn ipos_shift(&mut self, pos_shift: IPos) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 228 | fn first_match(&self, value: bool) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 253 | fn count(&self, value: bool) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 269 | fn compose(&self, map: &NewMap, map_offset: &Pos) -> NewMap { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `reset` is never used [INFO] [stdout] --> src/main.rs:399:8 [INFO] [stdout] | [INFO] [stdout] 336 | impl Map { [INFO] [stdout] | -------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 399 | fn reset(&mut self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `dist` and `isub` are never used [INFO] [stdout] --> src/main.rs:715:8 [INFO] [stdout] | [INFO] [stdout] 714 | impl Pos { [INFO] [stdout] | -------- methods in this implementation [INFO] [stdout] 715 | fn dist(&self, rhs: &Pos) -> usize { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 719 | fn isub(&self, rhs: &Self) -> IPos { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IPos` is never constructed [INFO] [stdout] --> src/main.rs:727:8 [INFO] [stdout] | [INFO] [stdout] 727 | struct IPos { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OffCenteredMap` is never constructed [INFO] [stdout] --> src/main.rs:736:8 [INFO] [stdout] | [INFO] [stdout] 736 | struct OffCenteredMap { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:741:14 [INFO] [stdout] | [INFO] [stdout] 740 | impl OffCenteredMap { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 741 | const fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SECTOR_MASK` is never used [INFO] [stdout] --> src/main.rs:749:12 [INFO] [stdout] | [INFO] [stdout] 749 | static mut SECTOR_MASK: [NewMap; NB_SECTORS] = [NewMap::new(); NB_SECTORS]; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TORPEDO_RANGE_MAP` is never used [INFO] [stdout] --> src/main.rs:750:12 [INFO] [stdout] | [INFO] [stdout] 750 | static mut TORPEDO_RANGE_MAP: OffCenteredMap = OffCenteredMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TORPEDO_SIDE_HIT_MAP` is never used [INFO] [stdout] --> src/main.rs:751:12 [INFO] [stdout] | [INFO] [stdout] 751 | static mut TORPEDO_SIDE_HIT_MAP: OffCenteredMap = OffCenteredMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `SILENCE_RANGE_MAP` is never used [INFO] [stdout] --> src/main.rs:752:12 [INFO] [stdout] | [INFO] [stdout] 752 | static mut SILENCE_RANGE_MAP: OffCenteredMap = OffCenteredMap::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `init_game_maps` is never used [INFO] [stdout] --> src/main.rs:754:11 [INFO] [stdout] | [INFO] [stdout] 754 | unsafe fn init_game_maps() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `FuzzyPos` is never used [INFO] [stdout] --> src/main.rs:803:6 [INFO] [stdout] | [INFO] [stdout] 803 | enum FuzzyPos { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PosData` is never constructed [INFO] [stdout] --> src/main.rs:809:8 [INFO] [stdout] | [INFO] [stdout] 809 | struct PosData { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `analyse_action`, and `analyse_actions` are never used [INFO] [stdout] --> src/main.rs:822:8 [INFO] [stdout] | [INFO] [stdout] 821 | impl PosData { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 822 | fn new(water_map: NewMap) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 831 | fn analyse_action(&mut self, action: &OppAction) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 882 | fn analyse_actions(&mut self, actions: &[OppAction]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MeAction` is never used [INFO] [stdout] --> src/main.rs:974:6 [INFO] [stdout] | [INFO] [stdout] 974 | enum MeAction { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `into_opp_action` is never used [INFO] [stdout] --> src/main.rs:998:8 [INFO] [stdout] | [INFO] [stdout] 997 | impl MeAction { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 998 | fn into_opp_action(&self, current_sector: usize) -> OppAction { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `OppAction` is never used [INFO] [stdout] --> src/main.rs:1013:6 [INFO] [stdout] | [INFO] [stdout] 1013 | enum OppAction { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `parse` is never used [INFO] [stdout] --> src/main.rs:1021:8 [INFO] [stdout] | [INFO] [stdout] 1020 | impl OppAction { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 1021 | fn parse(s: &str) -> Self { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `torpedo` is never used [INFO] [stdout] --> src/main.rs:1278:8 [INFO] [stdout] | [INFO] [stdout] 1153 | impl Game { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 1278 | fn torpedo(&mut self, pos: Pos) -> Result<(), ()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:756:21 [INFO] [stdout] | [INFO] [stdout] 756 | for (i, map) in SECTOR_MASK.iter_mut().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:771:25 [INFO] [stdout] | [INFO] [stdout] 771 | if pos.dist(&TORPEDO_RANGE_MAP.offset) <= 4 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 771 | if pos.dist(&raw const TORPEDO_RANGE_MAP.offset) <= 4 { [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:772:17 [INFO] [stdout] | [INFO] [stdout] 772 | TORPEDO_RANGE_MAP.map.set(pos, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:783:17 [INFO] [stdout] | [INFO] [stdout] 783 | TORPEDO_RANGE_MAP.map.set(pos, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:791:9 [INFO] [stdout] | [INFO] [stdout] 791 | SILENCE_RANGE_MAP.map.set(Pos { y: 4, x: i }, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:792:9 [INFO] [stdout] | [INFO] [stdout] 792 | SILENCE_RANGE_MAP.map.set(Pos { y: i, x: 4 }, true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:845:50 [INFO] [stdout] | [INFO] [stdout] 845 | ... let shift = pos.isub(&TORPEDO_RANGE_MAP.offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 845 | let shift = pos.isub(&raw const TORPEDO_RANGE_MAP.offset); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:846:40 [INFO] [stdout] | [INFO] [stdout] 846 | ... let mask = TORPEDO_RANGE_MAP.map.clone().ipos_shift(shift); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:850:41 [INFO] [stdout] | [INFO] [stdout] 850 | ... map.compose(&SILENCE_RANGE_MAP.map, &SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 850 | map.compose(&raw const SILENCE_RANGE_MAP.map, &SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:850:65 [INFO] [stdout] | [INFO] [stdout] 850 | ... map.compose(&SILENCE_RANGE_MAP.map, &SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 850 | map.compose(&SILENCE_RANGE_MAP.map, &raw const SILENCE_RANGE_MAP.offset); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:868:49 [INFO] [stdout] | [INFO] [stdout] 868 | map.ipos_shift(pos.isub(&SILENCE_RANGE_MAP.offset)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 868 | map.ipos_shift(pos.isub(&raw const SILENCE_RANGE_MAP.offset)); [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.30s [INFO] running `Command { std: "docker" "inspect" "0f3ef62a3db2ffde1f167114e184e1f8a09156bd80dc1bd60fcb12ae504a134f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0f3ef62a3db2ffde1f167114e184e1f8a09156bd80dc1bd60fcb12ae504a134f", kill_on_drop: false }` [INFO] [stdout] 0f3ef62a3db2ffde1f167114e184e1f8a09156bd80dc1bd60fcb12ae504a134f