[INFO] cloning repository https://github.com/ProfessorQu/battleship_website [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ProfessorQu/battleship_website" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FProfessorQu%2Fbattleship_website", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FProfessorQu%2Fbattleship_website'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d157110082740178cf95758d2992f4a12c8677e1 [INFO] checking ProfessorQu/battleship_website against master#bca37a20bd376ce3fd138e7cdee7fe704e0f8814 for pr-139493-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FProfessorQu%2Fbattleship_website" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ProfessorQu/battleship_website [INFO] finished tweaking git repo https://github.com/ProfessorQu/battleship_website [INFO] tweaked toml for git repo https://github.com/ProfessorQu/battleship_website written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ProfessorQu/battleship_website on toolchain bca37a20bd376ce3fd138e7cdee7fe704e0f8814 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+bca37a20bd376ce3fd138e7cdee7fe704e0f8814" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/ProfessorQu/battleship_website 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" "+bca37a20bd376ce3fd138e7cdee7fe704e0f8814" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.88 [INFO] [stderr] Downloaded gloo-console v0.3.0 [INFO] [stderr] Downloaded gloo-events v0.2.0 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.88 [INFO] [stderr] Downloaded battleship_bot v1.1.4 [INFO] [stderr] Downloaded gloo-file v0.3.0 [INFO] [stderr] Downloaded gloo-utils v0.2.0 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.88 [INFO] [stderr] Downloaded serde-wasm-bindgen v0.6.1 [INFO] [stderr] Downloaded yew v0.21.0 [INFO] [stderr] Downloaded futures v0.3.29 [INFO] [stderr] Downloaded yew-macro v0.21.0 [INFO] [stderr] Downloaded gloo-net v0.4.0 [INFO] [stderr] Downloaded implicit-clone-derive v0.1.1 [INFO] [stderr] Downloaded implicit-clone v0.4.8 [INFO] [stderr] Downloaded wasm-bindgen v0.2.88 [INFO] [stderr] Downloaded wasm-bindgen-futures v0.4.38 [INFO] [stderr] Downloaded gloo-render v0.2.0 [INFO] [stderr] Downloaded gloo-worker-macros v0.1.0 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.88 [INFO] [stderr] Downloaded gloo-dialogs v0.2.0 [INFO] [stderr] Downloaded js-sys v0.3.65 [INFO] [stderr] Downloaded gloo-history v0.2.1 [INFO] [stderr] Downloaded gloo-storage v0.3.0 [INFO] [stderr] Downloaded gloo-worker v0.4.0 [INFO] [stderr] Downloaded prettyplease v0.2.15 [INFO] [stderr] Downloaded gloo v0.10.0 [INFO] [stderr] Downloaded web-sys v0.3.65 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:aa71247004a7fa38d13ec170f48f06cdedf5bc50b2a8645e56ed7e992e6fa513" "/opt/rustwide/cargo-home/bin/cargo" "+bca37a20bd376ce3fd138e7cdee7fe704e0f8814" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 42e089057f562a4642c6cf4c0f7ac8db0a28513b9025f3d007a4e29dd2662d08 [INFO] running `Command { std: "docker" "start" "-a" "42e089057f562a4642c6cf4c0f7ac8db0a28513b9025f3d007a4e29dd2662d08", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "42e089057f562a4642c6cf4c0f7ac8db0a28513b9025f3d007a4e29dd2662d08", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "42e089057f562a4642c6cf4c0f7ac8db0a28513b9025f3d007a4e29dd2662d08", kill_on_drop: false }` [INFO] [stdout] 42e089057f562a4642c6cf4c0f7ac8db0a28513b9025f3d007a4e29dd2662d08 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:aa71247004a7fa38d13ec170f48f06cdedf5bc50b2a8645e56ed7e992e6fa513" "/opt/rustwide/cargo-home/bin/cargo" "+bca37a20bd376ce3fd138e7cdee7fe704e0f8814" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 91cbefbb947a62569bdc74f76ad4eccfc07f88df0adb2402e0646ebf529b592b [INFO] running `Command { std: "docker" "start" "-a" "91cbefbb947a62569bdc74f76ad4eccfc07f88df0adb2402e0646ebf529b592b", kill_on_drop: false }` [INFO] [stderr] Compiling once_cell v1.18.0 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.88 [INFO] [stderr] Compiling bumpalo v3.14.0 [INFO] [stderr] Compiling log v0.4.20 [INFO] [stderr] Compiling wasm-bindgen v0.2.88 [INFO] [stderr] Compiling serde v1.0.193 [INFO] [stderr] Compiling futures-core v0.3.29 [INFO] [stderr] Compiling thiserror v1.0.50 [INFO] [stderr] Compiling libc v0.2.150 [INFO] [stderr] Compiling serde_json v1.0.108 [INFO] [stderr] Compiling futures-channel v0.3.29 [INFO] [stderr] Compiling futures-task v0.3.29 [INFO] [stderr] Checking futures-sink v0.3.29 [INFO] [stderr] Compiling futures-util v0.3.29 [INFO] [stderr] Compiling syn v2.0.39 [INFO] [stderr] Compiling rustversion v1.0.14 [INFO] [stderr] Checking futures-io v0.3.29 [INFO] [stderr] Compiling hashbrown v0.14.2 [INFO] [stderr] Compiling toml_datetime v0.6.5 [INFO] [stderr] Compiling winnow v0.5.19 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling prettyplease v0.2.15 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking http v0.2.11 [INFO] [stderr] Checking tokio v1.34.0 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling boolinator v2.4.0 [INFO] [stderr] Compiling indexmap v2.1.0 [INFO] [stderr] Checking getrandom v0.2.11 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking tokio-stream v0.1.14 [INFO] [stderr] Checking battleship_bot v1.1.4 [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.88 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Compiling serde_derive v1.0.193 [INFO] [stderr] Compiling thiserror-impl v1.0.50 [INFO] [stderr] Compiling futures-macro v0.3.29 [INFO] [stderr] Compiling pin-project-internal v1.1.3 [INFO] [stderr] Compiling gloo-worker-macros v0.1.0 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling implicit-clone-derive v0.1.1 [INFO] [stderr] Checking implicit-clone v0.4.8 [INFO] [stderr] Compiling yew-macro v0.21.0 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.88 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking pin-project v1.1.3 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.88 [INFO] [stderr] Checking js-sys v0.3.65 [INFO] [stderr] Checking console_error_panic_hook v0.1.7 [INFO] [stderr] Checking futures v0.3.29 [INFO] [stderr] Checking pinned v0.1.0 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking prokio v0.1.0 [INFO] [stderr] Checking web-sys v0.3.65 [INFO] [stderr] Checking wasm-bindgen-futures v0.4.38 [INFO] [stderr] Checking serde-wasm-bindgen v0.6.1 [INFO] [stderr] Checking gloo-timers v0.3.0 [INFO] [stderr] Checking gloo-utils v0.2.0 [INFO] [stderr] Checking gloo-events v0.2.0 [INFO] [stderr] Checking gloo-dialogs v0.2.0 [INFO] [stderr] Checking gloo-render v0.2.0 [INFO] [stderr] Checking gloo-storage v0.3.0 [INFO] [stderr] Checking gloo-net v0.4.0 [INFO] [stderr] Checking gloo-worker v0.4.0 [INFO] [stderr] Checking gloo-console v0.3.0 [INFO] [stderr] Checking gloo-file v0.3.0 [INFO] [stderr] Checking gloo-history v0.2.1 [INFO] [stderr] Checking gloo v0.10.0 [INFO] [stderr] Checking yew v0.21.0 [INFO] [stderr] Checking battleship_website v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:5:19 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(PartialEq, Clone)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] 4 | pub enum Function { [INFO] [stdout] 5 | ShootFunction(fn(Pos, ShotMap) -> Pos), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(PartialEq, Clone)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 6 | PlaceFunction(fn() -> BoatMap) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | if *func == shoot::random as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 13 - if *func == shoot::random as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 13 + if std::ptr::fn_addr_eq(*func, shoot::random as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | } else if *func == shoot::random_and_random_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 15 - } else if *func == shoot::random_and_random_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 15 + } else if std::ptr::fn_addr_eq(*func, shoot::random_and_random_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | } else if *func == shoot::random_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 17 - } else if *func == shoot::random_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 17 + } else if std::ptr::fn_addr_eq(*func, shoot::random_and_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | } else if *func == shoot::grid_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 19 - } else if *func == shoot::grid_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 19 + } else if std::ptr::fn_addr_eq(*func, shoot::grid_and_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:21:27 [INFO] [stdout] | [INFO] [stdout] 21 | } else if *func == shoot::heatmap_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 21 - } else if *func == shoot::heatmap_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 21 + } else if std::ptr::fn_addr_eq(*func, shoot::heatmap_and_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:28:20 [INFO] [stdout] | [INFO] [stdout] 28 | if *func == place::random as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 28 - if *func == place::random as fn() -> BoatMap { [INFO] [stdout] 28 + if std::ptr::fn_addr_eq(*func, place::random as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:30:27 [INFO] [stdout] | [INFO] [stdout] 30 | } else if *func == place::sides as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 30 - } else if *func == place::sides as fn() -> BoatMap { [INFO] [stdout] 30 + } else if std::ptr::fn_addr_eq(*func, place::sides as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | } else if *func == place::spread as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 32 - } else if *func == place::spread as fn() -> BoatMap { [INFO] [stdout] 32 + } else if std::ptr::fn_addr_eq(*func, place::spread as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:34:27 [INFO] [stdout] | [INFO] [stdout] 34 | } else if *func == place::cluster as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 34 - } else if *func == place::cluster as fn() -> BoatMap { [INFO] [stdout] 34 + } else if std::ptr::fn_addr_eq(*func, place::cluster as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:5:19 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(PartialEq, Clone)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] 4 | pub enum Function { [INFO] [stdout] 5 | ShootFunction(fn(Pos, ShotMap) -> Pos), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] = note: `#[warn(unpredictable_function_pointer_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:6:19 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(PartialEq, Clone)] [INFO] [stdout] | --------- in this derive macro expansion [INFO] [stdout] ... [INFO] [stdout] 6 | PlaceFunction(fn() -> BoatMap) [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:13:20 [INFO] [stdout] | [INFO] [stdout] 13 | if *func == shoot::random as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 13 - if *func == shoot::random as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 13 + if std::ptr::fn_addr_eq(*func, shoot::random as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:15:27 [INFO] [stdout] | [INFO] [stdout] 15 | } else if *func == shoot::random_and_random_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 15 - } else if *func == shoot::random_and_random_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 15 + } else if std::ptr::fn_addr_eq(*func, shoot::random_and_random_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | } else if *func == shoot::random_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 17 - } else if *func == shoot::random_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 17 + } else if std::ptr::fn_addr_eq(*func, shoot::random_and_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | } else if *func == shoot::grid_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 19 - } else if *func == shoot::grid_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 19 + } else if std::ptr::fn_addr_eq(*func, shoot::grid_and_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:21:27 [INFO] [stdout] | [INFO] [stdout] 21 | } else if *func == shoot::heatmap_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 21 - } else if *func == shoot::heatmap_and_destroy as fn(Pos, ShotMap) -> Pos { [INFO] [stdout] 21 + } else if std::ptr::fn_addr_eq(*func, shoot::heatmap_and_destroy as fn(Pos, ShotMap) -> Pos) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:28:20 [INFO] [stdout] | [INFO] [stdout] 28 | if *func == place::random as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 28 - if *func == place::random as fn() -> BoatMap { [INFO] [stdout] 28 + if std::ptr::fn_addr_eq(*func, place::random as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:30:27 [INFO] [stdout] | [INFO] [stdout] 30 | } else if *func == place::sides as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 30 - } else if *func == place::sides as fn() -> BoatMap { [INFO] [stdout] 30 + } else if std::ptr::fn_addr_eq(*func, place::sides as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:32:27 [INFO] [stdout] | [INFO] [stdout] 32 | } else if *func == place::spread as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 32 - } else if *func == place::spread as fn() -> BoatMap { [INFO] [stdout] 32 + } else if std::ptr::fn_addr_eq(*func, place::spread as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function pointer comparisons do not produce meaningful results since their addresses are not guaranteed to be unique [INFO] [stdout] --> src/function.rs:34:27 [INFO] [stdout] | [INFO] [stdout] 34 | } else if *func == place::cluster as fn() -> BoatMap { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the address of the same function can vary between different codegen units [INFO] [stdout] = note: furthermore, different functions could have the same address after being merged together [INFO] [stdout] = note: for more information visit [INFO] [stdout] help: refactor your code, or use `std::ptr::fn_addr_eq` to suppress the lint [INFO] [stdout] | [INFO] [stdout] 34 - } else if *func == place::cluster as fn() -> BoatMap { [INFO] [stdout] 34 + } else if std::ptr::fn_addr_eq(*func, place::cluster as fn() -> BoatMap) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 35.95s [INFO] running `Command { std: "docker" "inspect" "91cbefbb947a62569bdc74f76ad4eccfc07f88df0adb2402e0646ebf529b592b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "91cbefbb947a62569bdc74f76ad4eccfc07f88df0adb2402e0646ebf529b592b", kill_on_drop: false }` [INFO] [stdout] 91cbefbb947a62569bdc74f76ad4eccfc07f88df0adb2402e0646ebf529b592b