[INFO] cloning repository https://github.com/grajnikanth/rust_book_exs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/grajnikanth/rust_book_exs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgrajnikanth%2Frust_book_exs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgrajnikanth%2Frust_book_exs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a21fa10a147af0898615d7706e29a64e9691149c [INFO] testing grajnikanth/rust_book_exs against try#dec9417b8611e34e787a3e4c37686b5131f9e5c5 for pr-154210-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fgrajnikanth%2Frust_book_exs" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/grajnikanth/rust_book_exs [INFO] finished tweaking git repo https://github.com/grajnikanth/rust_book_exs [INFO] tweaked toml for git repo https://github.com/grajnikanth/rust_book_exs written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/grajnikanth/rust_book_exs on toolchain dec9417b8611e34e787a3e4c37686b5131f9e5c5 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/grajnikanth/rust_book_exs 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" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4c3879a3dcf38fddb28f09fdac930c9e4456b3e2e9af96e35bcfef8ca7a60c03 [INFO] running `Command { std: "docker" "start" "-a" "4c3879a3dcf38fddb28f09fdac930c9e4456b3e2e9af96e35bcfef8ca7a60c03", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4c3879a3dcf38fddb28f09fdac930c9e4456b3e2e9af96e35bcfef8ca7a60c03", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4c3879a3dcf38fddb28f09fdac930c9e4456b3e2e9af96e35bcfef8ca7a60c03", kill_on_drop: false }` [INFO] [stdout] 4c3879a3dcf38fddb28f09fdac930c9e4456b3e2e9af96e35bcfef8ca7a60c03 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2904a84f698cdfdf902facc42c050975b8f7b5bcb6f394fb93c76add8a1bc84c [INFO] running `Command { std: "docker" "start" "-a" "2904a84f698cdfdf902facc42c050975b8f7b5bcb6f394fb93c76add8a1bc84c", kill_on_drop: false }` [INFO] [stderr] Compiling rust_book_exs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/lib.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 63 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 64 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `compare_display` is never used [INFO] [stdout] --> src/lib.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 69 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 72 | fn compare_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Nickel`, `Dime`, and `Quarter` are never constructed [INFO] [stdout] --> src/bin/10_match_ex2.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 3 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 4 | Penny, [INFO] [stdout] 5 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 6 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] 7 | Quarter [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `AwesomeTrait` is never used [INFO] [stdout] --> src/bin/82_int_trait_mut_cell.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | trait AwesomeTrait: Clone { [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 `Book` is never constructed [INFO] [stdout] --> src/bin/82_int_trait_mut_cell.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Book { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> src/bin/17_if_let_ex2.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let mut count = 0; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/bin/17_if_let_ex2.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | count += 1; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Alabama` is never constructed [INFO] [stdout] --> src/bin/17_if_let_ex2.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 14 | enum UsState { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 15 | Alabama, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UsState` has a derived impl for the trait `Debug`, 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: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/bin/17_if_let_ex2.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 20 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 21 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 22 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 23 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Coin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut ref1 = model_3000.on_sale.get(); //makes a copy of the bool [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let mut ref2 = model_3000.on_sale.get(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | let mut ref5 = model_3000.on_sale.get(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | let mut ref6 = model_3000.on_sale.get(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let mut ref3 = model_3000_no_cell.on_sale; // makes a copy [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let mut ref4 = model_3000_no_cell.on_sale; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref6` [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | let mut ref6 = model_3000.on_sale.get(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref6` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref3` [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let mut ref3 = model_3000_no_cell.on_sale; // makes a copy [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ref3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `company_name`, `model_name`, `screen_size`, `memory`, and `date_issued` are never read [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 8 | struct PhoneModel { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 9 | company_name: String, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 10 | model_name: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 11 | screen_size: f32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 12 | memory: usize, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 13 | date_issued: u32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PhoneModel` has a derived impl for the trait `Debug`, 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: fields `company_name`, `model_name`, `screen_size`, `memory`, and `date_issued` are never read [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 20 | struct PhoneModelNoCell { [INFO] [stdout] | ---------------- fields in this struct [INFO] [stdout] 21 | company_name: String, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] 22 | model_name: String, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 23 | screen_size: f32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 24 | memory: usize, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 25 | date_issued: u32, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PhoneModelNoCell` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `inner_struct` are never read [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 32 | struct Outer { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 33 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 34 | inner_struct: Inner, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Outer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `id` are never read [INFO] [stdout] --> src/bin/80_mut_w_cell.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 38 | struct Inner { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 39 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 40 | id: u32 [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `Inner` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/87_smrt_ptr_drop.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let c = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/bin/7_enum_deserialize.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [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 variable: `d` [INFO] [stdout] --> src/bin/87_smrt_ptr_drop.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let d = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/bin/7_enum_ex4.rs:7:11 [INFO] [stdout] | [INFO] [stdout] 7 | Write(String), [INFO] [stdout] | ----- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Message` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 7 - Write(String), [INFO] [stdout] 7 + Write(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/bin/7_enum_ex4.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 5 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 6 | Move {x: i32, y: i32}, // Struct data in this variant [INFO] [stdout] | ^^^^ [INFO] [stdout] 7 | Write(String), [INFO] [stdout] 8 | ChangeColor(i32, i32, i32) //data holds three integers [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Message` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/7_enum_deserialize.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 10 | fn deserialize(buf: &mut &[u8]) -> Self { [INFO] [stdout] | ---- expected `CounterInstruction` because of return type [INFO] [stdout] ... [INFO] [stdout] 13 | res [INFO] [stdout] | ^^^ expected `CounterInstruction`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/7_enum_deserialize.rs:19:54 [INFO] [stdout] | [INFO] [stdout] 19 | let instance_1 = CounterInstruction::deserialize(&mut data); [INFO] [stdout] | ------------------------------- ^^^^^^^^^ expected `&mut &[u8]`, found `&mut [u8; 1]` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected mutable reference `&mut &[u8]` [INFO] [stdout] found mutable reference `&mut [u8; 1]` [INFO] [stdout] note: associated function defined here [INFO] [stdout] --> src/bin/7_enum_deserialize.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | fn deserialize(buf: &mut &[u8]) -> Self { [INFO] [stdout] | ^^^^^^^^^^^ --------------- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/bin/61_generics_6.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 3 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 4 | x: T, [INFO] [stdout] 5 | y: T [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `CounterInstruction` doesn't implement `Debug` [INFO] [stdout] --> src/bin/7_enum_deserialize.rs:20:54 [INFO] [stdout] | [INFO] [stdout] 20 | println!("instance_1 converted to enum is {:?}", instance_1); [INFO] [stdout] | ---- ^^^^^^^^^^ `CounterInstruction` cannot be formatted using `{:?}` because it doesn't implement `Debug` [INFO] [stdout] | | [INFO] [stdout] | required by this formatting parameter [INFO] [stdout] | [INFO] [stdout] = help: the trait `Debug` is not implemented for `CounterInstruction` [INFO] [stdout] = note: add `#[derive(Debug)]` to `CounterInstruction` or manually `impl Debug for CounterInstruction` [INFO] [stdout] help: consider annotating `CounterInstruction` with `#[derive(Debug)]` [INFO] [stdout] | [INFO] [stdout] 4 + #[derive(Debug)] [INFO] [stdout] 5 | enum CounterInstruction { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_book_exs` (bin "7_enum_deserialize") due to 3 previous errors; 1 warning emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0382]: borrow of moved value: `x` [INFO] [stdout] --> src/bin/68_closure_2.rs:16:68 [INFO] [stdout] | [INFO] [stdout] 6 | let x = vec![1, 2, 3]; [INFO] [stdout] | - move occurs because `x` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 13 | let equal_to_x = move |z| {z == x}; [INFO] [stdout] | -------- - variable moved due to use in closure [INFO] [stdout] | | [INFO] [stdout] | value moved into closure here [INFO] [stdout] ... [INFO] [stdout] 16 | println!("can't use x here as it has moved to closure = {:?}", x); [INFO] [stdout] | ^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value before moving it into the closure [INFO] [stdout] | [INFO] [stdout] 13 ~ let value = x.clone(); [INFO] [stdout] 14 ~ let equal_to_x = move |z| {z == value}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_book_exs` (bin "68_closure_2") due to 1 previous error [INFO] running `Command { std: "docker" "inspect" "2904a84f698cdfdf902facc42c050975b8f7b5bcb6f394fb93c76add8a1bc84c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2904a84f698cdfdf902facc42c050975b8f7b5bcb6f394fb93c76add8a1bc84c", kill_on_drop: false }` [INFO] [stdout] 2904a84f698cdfdf902facc42c050975b8f7b5bcb6f394fb93c76add8a1bc84c