[INFO] cloning repository https://github.com/chickenchickenlove/programming-rust-book-study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/chickenchickenlove/programming-rust-book-study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchickenchickenlove%2Fprogramming-rust-book-study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchickenchickenlove%2Fprogramming-rust-book-study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d347947c425666f500e4799529e894a30a41da61 [INFO] testing chickenchickenlove/programming-rust-book-study against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchickenchickenlove%2Fprogramming-rust-book-study" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/chickenchickenlove/programming-rust-book-study [INFO] finished tweaking git repo https://github.com/chickenchickenlove/programming-rust-book-study [INFO] tweaked toml for git repo https://github.com/chickenchickenlove/programming-rust-book-study written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/chickenchickenlove/programming-rust-book-study on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/chickenchickenlove/programming-rust-book-study 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" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ee0d3582c6c52bfd97689e704903f9248a89c2becabb8c0dd549a840794afd70 [INFO] running `Command { std: "docker" "start" "-a" "ee0d3582c6c52bfd97689e704903f9248a89c2becabb8c0dd549a840794afd70", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ee0d3582c6c52bfd97689e704903f9248a89c2becabb8c0dd549a840794afd70", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ee0d3582c6c52bfd97689e704903f9248a89c2becabb8c0dd549a840794afd70", kill_on_drop: false }` [INFO] [stdout] ee0d3582c6c52bfd97689e704903f9248a89c2becabb8c0dd549a840794afd70 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] afdbb81781523a82a75293ca831c604b52ccf0683b2f4812914925f4be430ef6 [INFO] running `Command { std: "docker" "start" "-a" "afdbb81781523a82a75293ca831c604b52ccf0683b2f4812914925f4be430ef6", kill_on_drop: false }` [INFO] [stderr] Compiling programming-rust-book-study v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected one of `!` or `::`, found `` [INFO] [stdout] --> src/chapter11/type_refered_function.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | Y [INFO] [stdout] | ^ expected one of `!` or `::` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::os::unix::fs::chown` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::os::unix::fs::chown; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `GrayscaleMap`, `broom_test`, and `new_map` [INFO] [stdout] --> src/main.rs:2:43 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::chapter9::structh_with_field::{new_map, GrayscaleMap, broom_test}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::chapter11::impl_trait` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::chapter11::impl_trait; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::chapter11::trait_object_basic::hello` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use crate::chapter11::trait_object_basic::hello; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::chapter11::generic_and_type_paramter::top_ten` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::chapter11::generic_and_type_paramter::top_ten; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/chapter9/struct_with_impl.rs:28:32 [INFO] [stdout] | [INFO] [stdout] 28 | use std::mem::swap;; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/chapter9/generic_struct.rs:29:32 [INFO] [stdout] | [INFO] [stdout] 29 | use std::mem::swap;; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/chapter11/impl_trait.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Display` [INFO] [stdout] --> src/chapter11/my_iterator.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `trait_and_self::Concat` is not dyn compatible [INFO] [stdout] --> src/chapter11/trait_and_self.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | fn concat_do_do(s1: &dyn Concat, s2: &dyn Concat) { [INFO] [stdout] | ^^^^^^^^^^ `trait_and_self::Concat` is not dyn compatible [INFO] [stdout] | [INFO] [stdout] note: for a trait to be dyn compatible it needs to allow building a vtable [INFO] [stdout] for more information, visit [INFO] [stdout] --> src/chapter11/trait_and_self.rs:6:29 [INFO] [stdout] | [INFO] [stdout] 5 | pub trait Concat { [INFO] [stdout] | ------ this trait is not dyn compatible... [INFO] [stdout] 6 | fn concat(&self, other: &Self) -> &Self; [INFO] [stdout] | ^^^^^ ^^^^^ ...because method `concat` references the `Self` type in its return type [INFO] [stdout] | | [INFO] [stdout] | ...because method `concat` references the `Self` type in this parameter [INFO] [stdout] = help: consider moving `concat` to another trait [INFO] [stdout] = help: the following types implement `trait_and_self::Concat`: [INFO] [stdout] chapter11::trait_and_self::S1 [INFO] [stdout] chapter11::trait_and_self::S2 [INFO] [stdout] consider defining an enum where each variant holds one of these types, [INFO] [stdout] implementing `trait_and_self::Concat` for this new enum and using it instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0038]: the trait `trait_and_self::Concat` is not dyn compatible [INFO] [stdout] --> src/chapter11/trait_and_self.rs:32:18 [INFO] [stdout] | [INFO] [stdout] 32 | concat_do_do(&s1, &s2); [INFO] [stdout] | ^^^ `trait_and_self::Concat` is not dyn compatible [INFO] [stdout] | [INFO] [stdout] note: for a trait to be dyn compatible it needs to allow building a vtable [INFO] [stdout] for more information, visit [INFO] [stdout] --> src/chapter11/trait_and_self.rs:6:29 [INFO] [stdout] | [INFO] [stdout] 5 | pub trait Concat { [INFO] [stdout] | ------ this trait is not dyn compatible... [INFO] [stdout] 6 | fn concat(&self, other: &Self) -> &Self; [INFO] [stdout] | ^^^^^ ^^^^^ ...because method `concat` references the `Self` type in its return type [INFO] [stdout] | | [INFO] [stdout] | ...because method `concat` references the `Self` type in this parameter [INFO] [stdout] = help: consider moving `concat` to another trait [INFO] [stdout] = help: the following types implement `trait_and_self::Concat`: [INFO] [stdout] chapter11::trait_and_self::S1 [INFO] [stdout] chapter11::trait_and_self::S2 [INFO] [stdout] consider defining an enum where each variant holds one of these types, [INFO] [stdout] implementing `trait_and_self::Concat` for this new enum and using it instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/chapter11/bound_reverse.rs:19:24 [INFO] [stdout] | [INFO] [stdout] 15 | fn dot2(v1: &[N], v2: &[N]) -> N [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 19 | let mut total: N = 0; [INFO] [stdout] | - ^ expected type parameter `N`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `N` [INFO] [stdout] found type `{integer}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: cannot multiply `N` by `N` [INFO] [stdout] --> src/chapter11/bound_reverse.rs:21:31 [INFO] [stdout] | [INFO] [stdout] 21 | total = total + v1[i] * v2[i]; [INFO] [stdout] | ----- ^ ----- N [INFO] [stdout] | | [INFO] [stdout] | N [INFO] [stdout] | [INFO] [stdout] help: consider further restricting type parameter `N` with trait `Mul` [INFO] [stdout] | [INFO] [stdout] 16 | where N: Copy + std::ops::Mul [INFO] [stdout] | +++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/chapter11/bound_reverse.rs:31:24 [INFO] [stdout] | [INFO] [stdout] 28 | fn dot3(v1: &[N], v2: &[N]) -> N [INFO] [stdout] | - expected this type parameter [INFO] [stdout] ... [INFO] [stdout] 31 | let mut total: N = 0; [INFO] [stdout] | - ^ expected type parameter `N`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `N` [INFO] [stdout] found type `{integer}` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v1` [INFO] [stdout] --> src/chapter9/structh_with_tuple.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let v1: Vec = vec![0, 1, 2, 3]; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vec1` [INFO] [stdout] --> src/chapter9/structh_with_tuple.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let vec1: Vec = vec![0, 1, 2, 3]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_vec1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ascii` [INFO] [stdout] --> src/chapter9/structh_with_tuple.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let ascii = Ascii(v2); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_ascii` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `older` [INFO] [stdout] --> src/chapter9/struct_with_impl.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | let (older, younger) = q.split(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_older` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `younger` [INFO] [stdout] --> src/chapter9/struct_with_impl.rs:47:17 [INFO] [stdout] | [INFO] [stdout] 47 | let (older, younger) = q.split(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_younger` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `older` [INFO] [stdout] --> src/chapter9/generic_struct.rs:45:10 [INFO] [stdout] | [INFO] [stdout] 45 | let (older, younger) = q.split(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_older` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `younger` [INFO] [stdout] --> src/chapter9/generic_struct.rs:45:17 [INFO] [stdout] | [INFO] [stdout] 45 | let (older, younger) = q.split(); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_younger` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `poloynomial` [INFO] [stdout] --> src/chapter9/generic_struct_with_constant.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let poloynomial = Polynomial::new(coefficients); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_poloynomial` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `eq` [INFO] [stdout] --> src/chapter9/struct_with_common_trait.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let eq = a==b; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_eq` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `writer` [INFO] [stdout] --> src/chapter11/trait_object_basic.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let writer: &mut dyn Write = &mut buf; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_writer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `writer` [INFO] [stdout] --> src/chapter11/trait_object_basic.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | fn need_trait_object(writer: &mut dyn Write) { } [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_writer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `salad` [INFO] [stdout] --> src/chapter11/when_use_trait_object.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let salad = Salad { veggies: apples }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_salad` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `salad` [INFO] [stdout] --> src/chapter11/when_use_trait_object.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let salad = SaladDynamic { veggies: veggies }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_salad` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `canavas` [INFO] [stdout] --> src/chapter11/trait_impl.rs:16:20 [INFO] [stdout] | [INFO] [stdout] 16 | fn draw(&self, canavas: &mut Canvas) { hello() } [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_canavas` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `canavas` [INFO] [stdout] --> src/chapter11/trait_impl.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | fn draw(&self, canavas: &mut Canvas) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_canavas` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/chapter11/trait_and_self.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 14 | fn concat(&self, other: &Self) -> &Self { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other` [INFO] [stdout] --> src/chapter11/trait_and_self.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | fn concat(&self, other: &Self) -> &Self { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rhs` [INFO] [stdout] --> src/chapter11/my_iterator.rs:83:18 [INFO] [stdout] | [INFO] [stdout] 83 | fn mul(self, rhs: MyComplex) -> Self::Output { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rhs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0038, E0308, E0369. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0038`. [INFO] [stdout] [INFO] [stderr] error: could not compile `programming-rust-book-study` (bin "programming-rust-book-study") due to 6 previous errors; 27 warnings emitted [INFO] running `Command { std: "docker" "inspect" "afdbb81781523a82a75293ca831c604b52ccf0683b2f4812914925f4be430ef6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "afdbb81781523a82a75293ca831c604b52ccf0683b2f4812914925f4be430ef6", kill_on_drop: false }` [INFO] [stdout] afdbb81781523a82a75293ca831c604b52ccf0683b2f4812914925f4be430ef6