[INFO] cloning repository https://github.com/manfromth3m0oN/generic_counter [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/manfromth3m0oN/generic_counter" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmanfromth3m0oN%2Fgeneric_counter", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmanfromth3m0oN%2Fgeneric_counter'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b7f82fef223b6b6c181f96dc4b7f1f01620df5aa [INFO] checking manfromth3m0oN/generic_counter against try#26ad8a85dc4eed299af809e52f278da81e284602 for pr-138458 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmanfromth3m0oN%2Fgeneric_counter" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/manfromth3m0oN/generic_counter on toolchain 26ad8a85dc4eed299af809e52f278da81e284602 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+26ad8a85dc4eed299af809e52f278da81e284602" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/manfromth3m0oN/generic_counter [INFO] finished tweaking git repo https://github.com/manfromth3m0oN/generic_counter [INFO] tweaked toml for git repo https://github.com/manfromth3m0oN/generic_counter written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/manfromth3m0oN/generic_counter 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" "+26ad8a85dc4eed299af809e52f278da81e284602" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] checking manfromth3m0oN/generic_counter against try#26ad8a85dc4eed299af809e52f278da81e284602 for pr-138458 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmanfromth3m0oN%2Fgeneric_counter" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/manfromth3m0oN/generic_counter on toolchain 26ad8a85dc4eed299af809e52f278da81e284602 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+26ad8a85dc4eed299af809e52f278da81e284602" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/manfromth3m0oN/generic_counter [INFO] finished tweaking git repo https://github.com/manfromth3m0oN/generic_counter [INFO] tweaked toml for git repo https://github.com/manfromth3m0oN/generic_counter written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/manfromth3m0oN/generic_counter 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" "+26ad8a85dc4eed299af809e52f278da81e284602" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] checking manfromth3m0oN/generic_counter against try#26ad8a85dc4eed299af809e52f278da81e284602 for pr-138458 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmanfromth3m0oN%2Fgeneric_counter" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/manfromth3m0oN/generic_counter on toolchain 26ad8a85dc4eed299af809e52f278da81e284602 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+26ad8a85dc4eed299af809e52f278da81e284602" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/manfromth3m0oN/generic_counter [INFO] finished tweaking git repo https://github.com/manfromth3m0oN/generic_counter [INFO] tweaked toml for git repo https://github.com/manfromth3m0oN/generic_counter written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/manfromth3m0oN/generic_counter 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" "+26ad8a85dc4eed299af809e52f278da81e284602" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [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-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:1680c8fbd8dfb46fcd6d22e546df16ab0e007457dc29fcd9e987cdd5077fd1af" "/opt/rustwide/cargo-home/bin/cargo" "+26ad8a85dc4eed299af809e52f278da81e284602" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 42fc39fd02251c7ad08f5c99342dca09f953bc617f8e93e5e0e4bc38f07cfe71 [INFO] running `Command { std: "docker" "start" "-a" "42fc39fd02251c7ad08f5c99342dca09f953bc617f8e93e5e0e4bc38f07cfe71", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "42fc39fd02251c7ad08f5c99342dca09f953bc617f8e93e5e0e4bc38f07cfe71", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "42fc39fd02251c7ad08f5c99342dca09f953bc617f8e93e5e0e4bc38f07cfe71", kill_on_drop: false }` [INFO] [stdout] 42fc39fd02251c7ad08f5c99342dca09f953bc617f8e93e5e0e4bc38f07cfe71 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:1680c8fbd8dfb46fcd6d22e546df16ab0e007457dc29fcd9e987cdd5077fd1af" "/opt/rustwide/cargo-home/bin/cargo" "+26ad8a85dc4eed299af809e52f278da81e284602" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6568952f0a039b16c2f80a6df10c1653217ad8be84d03d2de51591904ccd3429 [INFO] running `Command { std: "docker" "start" "-a" "6568952f0a039b16c2f80a6df10c1653217ad8be84d03d2de51591904ccd3429", kill_on_drop: false }` [INFO] [stderr] Checking counter v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:23:44 [INFO] [stdout] | [INFO] [stdout] 23 | first_cart.add_tupaware(purple_tupware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:23:44 [INFO] [stdout] | [INFO] [stdout] 23 | first_cart.add_tupaware(purple_tupware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:24:44 [INFO] [stdout] | [INFO] [stdout] 24 | first_cart.add_tupaware(green_tupaware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:24:44 [INFO] [stdout] | [INFO] [stdout] 24 | first_cart.add_tupaware(green_tupaware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:25:43 [INFO] [stdout] | [INFO] [stdout] 25 | first_cart.add_tupaware(blue_tupaware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:25:43 [INFO] [stdout] | [INFO] [stdout] 25 | first_cart.add_tupaware(blue_tupaware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:26:43 [INFO] [stdout] | [INFO] [stdout] 26 | first_cart.add_tupaware(pink_tupaware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: the method `clone` exists for struct `Tupaware`, but its trait bounds were not satisfied [INFO] [stdout] --> src/main.rs:26:43 [INFO] [stdout] | [INFO] [stdout] 26 | first_cart.add_tupaware(pink_tupaware.clone()); [INFO] [stdout] | ^^^^^ method cannot be called on `Tupaware` due to unsatisfied trait bounds [INFO] [stdout] | [INFO] [stdout] ::: src/counter.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Countable { [INFO] [stdout] | ------------------- doesn't satisfy `dyn Countable: Clone` [INFO] [stdout] | [INFO] [stdout] ::: src/tupaware.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tupaware { [INFO] [stdout] | ------------------------------------------ method `clone` not found for this struct because it doesn't satisfy `Tupaware: Clone` [INFO] [stdout] | [INFO] [stdout] note: trait bound `dyn Countable: Clone` was not satisfied [INFO] [stdout] --> src/tupaware.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Clone)] [INFO] [stdout] | ^^^^^ unsatisfied trait bound introduced in this `derive` macro [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] = note: the following trait defines an item `clone`, perhaps you need to implement it: [INFO] [stdout] candidate #1: `Clone` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 42 | fn gen_filled_apple_tupaware(colour: &str) -> Tupaware { [INFO] [stdout] | ----------------------- expected `Tupaware<(dyn Countable + 'static)>` because of return type [INFO] [stdout] ... [INFO] [stdout] 46 | tupaware.add_item(apple); [INFO] [stdout] | -------- ----- this argument has type `Apple`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `tupaware` to have type `Tupaware` [INFO] [stdout] 47 | } [INFO] [stdout] 48 | tupaware [INFO] [stdout] | ^^^^^^^^ expected `Tupaware`, found `Tupaware` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Tupaware<(dyn Countable + 'static)>` [INFO] [stdout] found struct `Tupaware` [INFO] [stdout] = help: `Apple` implements `Countable` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 42 | fn gen_filled_apple_tupaware(colour: &str) -> Tupaware { [INFO] [stdout] | ----------------------- expected `Tupaware<(dyn Countable + 'static)>` because of return type [INFO] [stdout] ... [INFO] [stdout] 46 | tupaware.add_item(apple); [INFO] [stdout] | -------- ----- this argument has type `Apple`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `tupaware` to have type `Tupaware` [INFO] [stdout] 47 | } [INFO] [stdout] 48 | tupaware [INFO] [stdout] | ^^^^^^^^ expected `Tupaware`, found `Tupaware` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Tupaware<(dyn Countable + 'static)>` [INFO] [stdout] found struct `Tupaware` [INFO] [stdout] = help: `Apple` implements `Countable` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 51 | fn gen_filled_pear_tupware(colour: &str) -> Tupaware { [INFO] [stdout] | ----------------------- expected `Tupaware<(dyn Countable + 'static)>` because of return type [INFO] [stdout] ... [INFO] [stdout] 55 | tupaware.add_item(pear); [INFO] [stdout] | -------- ---- this argument has type `Pear`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `tupaware` to have type `Tupaware` [INFO] [stdout] 56 | } [INFO] [stdout] 57 | tupaware [INFO] [stdout] | ^^^^^^^^ expected `Tupaware`, found `Tupaware` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Tupaware<(dyn Countable + 'static)>` [INFO] [stdout] found struct `Tupaware` [INFO] [stdout] = help: `Pear` implements `Countable` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 51 | fn gen_filled_pear_tupware(colour: &str) -> Tupaware { [INFO] [stdout] | ----------------------- expected `Tupaware<(dyn Countable + 'static)>` because of return type [INFO] [stdout] ... [INFO] [stdout] 55 | tupaware.add_item(pear); [INFO] [stdout] | -------- ---- this argument has type `Pear`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `tupaware` to have type `Tupaware` [INFO] [stdout] 56 | } [INFO] [stdout] 57 | tupaware [INFO] [stdout] | ^^^^^^^^ expected `Tupaware`, found `Tupaware` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Tupaware<(dyn Countable + 'static)>` [INFO] [stdout] found struct `Tupaware` [INFO] [stdout] = help: `Pear` implements `Countable` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `total` [INFO] [stdout] --> src/tupaware.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 24 | let total: usize = 0; [INFO] [stdout] | ----- first assignment to `total` [INFO] [stdout] 25 | for item in &self.contents { [INFO] [stdout] 26 | total += item.get_count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 24 | let mut total: usize = 0; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `total` [INFO] [stdout] --> src/tupaware.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 24 | let total: usize = 0; [INFO] [stdout] | ----- first assignment to `total` [INFO] [stdout] 25 | for item in &self.contents { [INFO] [stdout] 26 | total += item.get_count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 24 | let mut total: usize = 0; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0384, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0384, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `counter` (bin "counter") due to 7 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `counter` (bin "counter" test) due to 7 previous errors [INFO] running `Command { std: "docker" "inspect" "6568952f0a039b16c2f80a6df10c1653217ad8be84d03d2de51591904ccd3429", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6568952f0a039b16c2f80a6df10c1653217ad8be84d03d2de51591904ccd3429", kill_on_drop: false }` [INFO] [stdout] 6568952f0a039b16c2f80a6df10c1653217ad8be84d03d2de51591904ccd3429