[INFO] cloning repository https://github.com/BranLiang/the-rust-book-exercise [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/BranLiang/the-rust-book-exercise" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBranLiang%2Fthe-rust-book-exercise", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBranLiang%2Fthe-rust-book-exercise'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 30a1e41b7f204c1d48371e77a4e4e2fffaf231dc [INFO] checking BranLiang/the-rust-book-exercise/30a1e41b7f204c1d48371e77a4e4e2fffaf231dc against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBranLiang%2Fthe-rust-book-exercise" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/BranLiang/the-rust-book-exercise on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/BranLiang/the-rust-book-exercise [INFO] finished tweaking git repo https://github.com/BranLiang/the-rust-book-exercise [INFO] tweaked toml for git repo https://github.com/BranLiang/the-rust-book-exercise written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/BranLiang/the-rust-book-exercise 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" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a086ac56840fe931597cd16dcbb9ca2a232489f36243263e6548f9b1ebe4ed44 [INFO] running `Command { std: "docker" "start" "-a" "a086ac56840fe931597cd16dcbb9ca2a232489f36243263e6548f9b1ebe4ed44", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a086ac56840fe931597cd16dcbb9ca2a232489f36243263e6548f9b1ebe4ed44", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a086ac56840fe931597cd16dcbb9ca2a232489f36243263e6548f9b1ebe4ed44", kill_on_drop: false }` [INFO] [stdout] a086ac56840fe931597cd16dcbb9ca2a232489f36243263e6548f9b1ebe4ed44 [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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4bcab24d4e0080de403bff2b72033f391b10dee4fa085cd5ef3ba98153ebb56f [INFO] running `Command { std: "docker" "start" "-a" "4bcab24d4e0080de403bff2b72033f391b10dee4fa085cd5ef3ba98153ebb56f", kill_on_drop: false }` [INFO] [stderr] Checking the-rust-book-exercises v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/ch17/encoding_type.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `post` [INFO] [stdout] --> src/ch17/state_pattern.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | fn content<'a>(&self, post: &'a Post) -> &'a str { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_post` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mean` is never used [INFO] [stdout] --> src/ch08/list_of_integers.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn mean(list: &Vec) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `median` is never used [INFO] [stdout] --> src/ch08/list_of_integers.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn median(list: &Vec) -> i32 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mode` is never used [INFO] [stdout] --> src/ch08/list_of_integers.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | fn mode(list: &Vec) -> Option { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pig_latin` is never used [INFO] [stdout] --> src/ch08/pig_latin.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn pig_latin(sentence: &String) -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Company` is never used [INFO] [stdout] --> src/ch08/text_interface.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type Company = HashMap>; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_employee` is never used [INFO] [stdout] --> src/ch08/text_interface.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn add_employee(company: &mut Company, cmd: &str) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `people` is never used [INFO] [stdout] --> src/ch08/text_interface.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | fn people<'a>(company: &'a Company, department: &str) -> &'a Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Post` is never constructed [INFO] [stdout] --> src/ch17/state_pattern.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct Post { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_text`, `content`, `request_review`, `approve`, and `reject` are never used [INFO] [stdout] --> src/ch17/state_pattern.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 6 | impl Post { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 7 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn add_text(&mut self, text: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn content(&self) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn request_review(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn approve(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | pub fn reject(&mut self) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `State` is never used [INFO] [stdout] --> src/ch17/state_pattern.rs:43:7 [INFO] [stdout] | [INFO] [stdout] 43 | trait State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Draft` is never constructed [INFO] [stdout] --> src/ch17/state_pattern.rs:53:8 [INFO] [stdout] | [INFO] [stdout] 53 | struct Draft {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PendingReview` is never constructed [INFO] [stdout] --> src/ch17/state_pattern.rs:71:8 [INFO] [stdout] | [INFO] [stdout] 71 | struct PendingReview { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch17/state_pattern.rs:76:12 [INFO] [stdout] | [INFO] [stdout] 75 | impl PendingReview { [INFO] [stdout] | ------------------ associated function in this implementation [INFO] [stdout] 76 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Published` is never constructed [INFO] [stdout] --> src/ch17/state_pattern.rs:100:8 [INFO] [stdout] | [INFO] [stdout] 100 | struct Published {} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Post` is never constructed [INFO] [stdout] --> src/ch17/encoding_type.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct Post { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `content` are never used [INFO] [stdout] --> src/ch17/encoding_type.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl Post { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 6 | pub fn new() -> DraftPost { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 10 | pub fn content(&self) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `DraftPost` is never constructed [INFO] [stdout] --> src/ch17/encoding_type.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct DraftPost { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `request_review` and `add_text` are never used [INFO] [stdout] --> src/ch17/encoding_type.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl DraftPost { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 20 | pub fn request_review(self) -> PendingReviewPost { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 24 | pub fn add_text(&mut self, text: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PendingReviewPost` is never constructed [INFO] [stdout] --> src/ch17/encoding_type.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | struct PendingReviewPost { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `approve` and `reject` are never used [INFO] [stdout] --> src/ch17/encoding_type.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 33 | impl PendingReviewPost { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] 34 | pub fn approve(self) -> ReviewedPost { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn reject(self) -> DraftPost { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ReviewedPost` is never constructed [INFO] [stdout] --> src/ch17/encoding_type.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | struct ReviewedPost { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `approve` and `reject` are never used [INFO] [stdout] --> src/ch17/encoding_type.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 47 | impl ReviewedPost { [INFO] [stdout] | ----------------- methods in this implementation [INFO] [stdout] 48 | pub fn approve(self) -> Post { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn reject(self) -> PendingReviewPost { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Messenger` is never used [INFO] [stdout] --> src/ch15/mod.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | pub trait Messenger { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `LimitTracker` is never constructed [INFO] [stdout] --> src/ch15/mod.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct LimitTracker<'a, T: Messenger> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `set_value` are never used [INFO] [stdout] --> src/ch15/mod.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl<'a, T> LimitTracker<'a, T> where T: Messenger { [INFO] [stdout] | -------------------------------------------------- associated items in this implementation [INFO] [stdout] 12 | pub fn new(messenger: &T, max: usize) -> LimitTracker { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn set_value(&mut self, value: usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ch08/pig_latin.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | pig_latin_word.push_str(word.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ch08/pig_latin.rs:14:33 [INFO] [stdout] | [INFO] [stdout] 14 | let mut chars = word.clone().chars(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 29 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `post` [INFO] [stdout] --> src/ch17/state_pattern.rs:47:27 [INFO] [stdout] | [INFO] [stdout] 47 | fn content<'a>(&self, post: &'a Post) -> &'a str { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_post` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `reject` is never used [INFO] [stdout] --> src/ch17/encoding_type.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 47 | impl ReviewedPost { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn reject(self) -> PendingReviewPost { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ch08/pig_latin.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | pig_latin_word.push_str(word.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/ch08/pig_latin.rs:14:33 [INFO] [stdout] | [INFO] [stdout] 14 | let mut chars = word.clone().chars(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s [INFO] running `Command { std: "docker" "inspect" "4bcab24d4e0080de403bff2b72033f391b10dee4fa085cd5ef3ba98153ebb56f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4bcab24d4e0080de403bff2b72033f391b10dee4fa085cd5ef3ba98153ebb56f", kill_on_drop: false }` [INFO] [stdout] 4bcab24d4e0080de403bff2b72033f391b10dee4fa085cd5ef3ba98153ebb56f