[INFO] cloning repository https://github.com/LegendSaber/design_pattern [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/LegendSaber/design_pattern" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLegendSaber%2Fdesign_pattern", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLegendSaber%2Fdesign_pattern'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7221ae7258c5fb75ca03517dd824021ad855fb77 [INFO] checking LegendSaber/design_pattern against master#bca37a20bd376ce3fd138e7cdee7fe704e0f8814 for pr-139493-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FLegendSaber%2Fdesign_pattern" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/LegendSaber/design_pattern [INFO] finished tweaking git repo https://github.com/LegendSaber/design_pattern [INFO] tweaked toml for git repo https://github.com/LegendSaber/design_pattern written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/LegendSaber/design_pattern 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/LegendSaber/design_pattern 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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded proc-macro2 v1.0.82 [INFO] [stderr] Downloaded cc v1.0.97 [INFO] [stderr] Downloaded syn v2.0.61 [INFO] [stderr] Downloaded libc v0.2.154 [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:aa71247004a7fa38d13ec170f48f06cdedf5bc50b2a8645e56ed7e992e6fa513" "/opt/rustwide/cargo-home/bin/cargo" "+bca37a20bd376ce3fd138e7cdee7fe704e0f8814" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 77e9f249bdc4deff39b002bc6c00cb8d692b7d5d1c35303c789a8ba8e494ac53 [INFO] running `Command { std: "docker" "start" "-a" "77e9f249bdc4deff39b002bc6c00cb8d692b7d5d1c35303c789a8ba8e494ac53", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "77e9f249bdc4deff39b002bc6c00cb8d692b7d5d1c35303c789a8ba8e494ac53", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77e9f249bdc4deff39b002bc6c00cb8d692b7d5d1c35303c789a8ba8e494ac53", kill_on_drop: false }` [INFO] [stdout] 77e9f249bdc4deff39b002bc6c00cb8d692b7d5d1c35303c789a8ba8e494ac53 [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" "-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] b111da2bde0d1192138c6b209692d311f6411b6811126a2d8f8d5992d287ae24 [INFO] running `Command { std: "docker" "start" "-a" "b111da2bde0d1192138c6b209692d311f6411b6811126a2d8f8d5992d287ae24", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling libc v0.2.154 [INFO] [stderr] Compiling autocfg v1.3.0 [INFO] [stderr] Checking iana-time-zone v0.1.60 [INFO] [stderr] Checking command_pattern v0.1.0 (/opt/rustwide/workdir/command_pattern) [INFO] [stderr] Checking adapter_pattern v0.1.0 (/opt/rustwide/workdir/adapter_pattern) [INFO] [stderr] Checking state_pattern v0.1.0 (/opt/rustwide/workdir/state_pattern) [INFO] [stderr] Checking bridge_pattern v0.1.0 (/opt/rustwide/workdir/bridge_pattern) [INFO] [stderr] Checking builder_pattern v0.1.0 (/opt/rustwide/workdir/builder_pattern) [INFO] [stderr] Checking interpreter_pattern v0.1.0 (/opt/rustwide/workdir/interpreter_pattern) [INFO] [stderr] Checking iterator_pattern v0.1.0 (/opt/rustwide/workdir/iterator_pattern) [INFO] [stderr] Checking chain_of_responsibility_pattern v0.1.0 (/opt/rustwide/workdir/chain_of_responsibility_pattern) [INFO] [stderr] Checking singleton_pattern v0.1.0 (/opt/rustwide/workdir/singleton_pattern) [INFO] [stderr] Checking memento_pattern v0.1.0 (/opt/rustwide/workdir/memento_pattern) [INFO] [stdout] warning: struct `Wrapper` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Wrapper; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Bottle` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct Bottle; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Burger` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | struct Burger; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ColdDrink` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct ColdDrink; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking null_object_pattern v0.1.0 (/opt/rustwide/workdir/null_object_pattern) [INFO] [stderr] Checking factory_pattern v0.1.0 (/opt/rustwide/workdir/factory_pattern) [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> singleton_pattern/src/single_object.rs:17:16 [INFO] [stdout] | [INFO] [stdout] 17 | if INSTANCE.is_none() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking proxy_pattern v0.1.0 (/opt/rustwide/workdir/proxy_pattern) [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> singleton_pattern/src/single_object.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | INSTANCE.as_ref().unwrap() [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] [stderr] Checking strategy_pattern v0.1.0 (/opt/rustwide/workdir/strategy_pattern) [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> singleton_pattern/src/single_object.rs:17:16 [INFO] [stdout] | [INFO] [stdout] 17 | if INSTANCE.is_none() { [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] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> singleton_pattern/src/single_object.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | INSTANCE.as_ref().unwrap() [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] [stderr] Checking template_pattern v0.1.0 (/opt/rustwide/workdir/template_pattern) [INFO] [stderr] Checking prototype_pattern v0.1.0 (/opt/rustwide/workdir/prototype_pattern) [INFO] [stdout] warning: method `is_null` is never used [INFO] [stdout] --> null_object_pattern/src/null_object.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 2 | trait AbstractCustomer { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] 3 | fn is_null(&self) -> bool; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Wrapper` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Wrapper; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Bottle` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct Bottle; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Burger` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | struct Burger; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ColdDrink` is never constructed [INFO] [stdout] --> builder_pattern/src/builder.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct ColdDrink; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking observer_pattern v0.1.0 (/opt/rustwide/workdir/observer_pattern) [INFO] [stdout] warning: field `shape_type` is never read [INFO] [stdout] --> prototype_pattern/src/prototype_pattern.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 9 | struct ShapeValue { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 10 | id: Option, [INFO] [stdout] 11 | shape_type: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ShapeValue` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_shape_type` and `set_shape_type` are never used [INFO] [stdout] --> prototype_pattern/src/prototype_pattern.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl ShapeValue { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | fn get_shape_type(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn set_shape_type(&mut self, shape_type: String) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> prototype_pattern/src/prototype_pattern.rs:109:21 [INFO] [stdout] | [INFO] [stdout] 109 | cached_shape.clone() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `Box` does not implement `Clone`, so calling `clone` on `&Box` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 109 - cached_shape.clone() [INFO] [stdout] 109 + cached_shape [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_null` is never used [INFO] [stdout] --> null_object_pattern/src/null_object.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 2 | trait AbstractCustomer { [INFO] [stdout] | ---------------- method in this trait [INFO] [stdout] 3 | fn is_null(&self) -> bool; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `shape_type` is never read [INFO] [stdout] --> prototype_pattern/src/prototype_pattern.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 9 | struct ShapeValue { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 10 | id: Option, [INFO] [stdout] 11 | shape_type: Option, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ShapeValue` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_shape_type` and `set_shape_type` are never used [INFO] [stdout] --> prototype_pattern/src/prototype_pattern.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 14 | impl ShapeValue { [INFO] [stdout] | --------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | fn get_shape_type(&self) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn set_shape_type(&mut self, shape_type: String) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> prototype_pattern/src/prototype_pattern.rs:109:21 [INFO] [stdout] | [INFO] [stdout] 109 | cached_shape.clone() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `Box` does not implement `Clone`, so calling `clone` on `&Box` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 109 - cached_shape.clone() [INFO] [stdout] 109 + cached_shape [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking flyweight_pattern v0.1.0 (/opt/rustwide/workdir/flyweight_pattern) [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> flyweight_pattern/src/flyweight.rs:49:45 [INFO] [stdout] | [INFO] [stdout] 49 | self.circle_map.get(&color).unwrap().clone() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `Box` does not implement `Clone`, so calling `clone` on `&Box` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 49 - self.circle_map.get(&color).unwrap().clone() [INFO] [stdout] 49 + self.circle_map.get(&color).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> flyweight_pattern/src/flyweight.rs:49:45 [INFO] [stdout] | [INFO] [stdout] 49 | self.circle_map.get(&color).unwrap().clone() [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `Box` does not implement `Clone`, so calling `clone` on `&Box` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 49 - self.circle_map.get(&color).unwrap().clone() [INFO] [stdout] 49 + self.circle_map.get(&color).unwrap() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking mediator_pattern v0.1.0 (/opt/rustwide/workdir/mediator_pattern) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.05s [INFO] running `Command { std: "docker" "inspect" "b111da2bde0d1192138c6b209692d311f6411b6811126a2d8f8d5992d287ae24", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b111da2bde0d1192138c6b209692d311f6411b6811126a2d8f8d5992d287ae24", kill_on_drop: false }` [INFO] [stdout] b111da2bde0d1192138c6b209692d311f6411b6811126a2d8f8d5992d287ae24