[INFO] cloning repository https://github.com/luxleo/rust_book [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/luxleo/rust_book" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fluxleo%2Frust_book", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fluxleo%2Frust_book'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a1bf8e69308fa68a1a2ee6ffc7723136c4ae9dfd [INFO] checking luxleo/rust_book against try#fc545c6b951a304df08b327c158f92678582f435 for pr-140557 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fluxleo%2Frust_book" "/workspace/builds/worker-0-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/luxleo/rust_book on toolchain fc545c6b951a304df08b327c158f92678582f435 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+fc545c6b951a304df08b327c158f92678582f435" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/luxleo/rust_book [INFO] finished tweaking git repo https://github.com/luxleo/rust_book [INFO] tweaked toml for git repo https://github.com/luxleo/rust_book written to /workspace/builds/worker-0-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/luxleo/rust_book 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" "+fc545c6b951a304df08b327c158f92678582f435" "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-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+fc545c6b951a304df08b327c158f92678582f435" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 853cd4eec91bcedc8674edb03dc40e44c14cb1d0bc8d289ee0259e29e4cc8bde [INFO] running `Command { std: "docker" "start" "-a" "853cd4eec91bcedc8674edb03dc40e44c14cb1d0bc8d289ee0259e29e4cc8bde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "853cd4eec91bcedc8674edb03dc40e44c14cb1d0bc8d289ee0259e29e4cc8bde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "853cd4eec91bcedc8674edb03dc40e44c14cb1d0bc8d289ee0259e29e4cc8bde", kill_on_drop: false }` [INFO] [stdout] 853cd4eec91bcedc8674edb03dc40e44c14cb1d0bc8d289ee0259e29e4cc8bde [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+fc545c6b951a304df08b327c158f92678582f435" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f0fa4d4ca1c7bd3b1f1584cca422344cce1a8a4fcc84361de7c1a74407ff5643 [INFO] running `Command { std: "docker" "start" "-a" "f0fa4d4ca1c7bd3b1f1584cca422344cce1a8a4fcc84361de7c1a74407ff5643", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.171 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking rust-book v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/chap3/b_data_types.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | if( num < 1 || num > 3) { [INFO] [stdout] | ^^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 13 - if( num < 1 || num > 3) { [INFO] [stdout] 13 + if num < 1 || num > 3 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/chap3/e_control_flow.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/chap3/e_control_flow.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | if (pos.0 == 2 && pos.1 == 2) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 29 - if (pos.0 == 2 && pos.1 == 2) { [INFO] [stdout] 29 + if pos.0 == 2 && pos.1 == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/chap3/e_control_flow.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for i in (1..5) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 50 - for i in (1..5) { [INFO] [stdout] 50 + for i in 1..5 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/chap3/e_control_flow.rs:127:16 [INFO] [stdout] | [INFO] [stdout] 127 | for num in (2..x+1){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 127 - for num in (2..x+1){ [INFO] [stdout] 127 + for num in 2..x+1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::arch::x86_64::_mm256_castsi256_si128` [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::arch::x86_64::_mm256_castsi256_si128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/chap3/b_data_types.rs:13:19 [INFO] [stdout] | [INFO] [stdout] 13 | if( num < 1 || num > 3) { [INFO] [stdout] | ^^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 13 - if( num < 1 || num > 3) { [INFO] [stdout] 13 + if num < 1 || num > 3 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Read` [INFO] [stdout] --> src/chap3/e_control_flow.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/chap3/e_control_flow.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | if (pos.0 == 2 && pos.1 == 2) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 29 - if (pos.0 == 2 && pos.1 == 2) { [INFO] [stdout] 29 + if pos.0 == 2 && pos.1 == 2 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/chap3/e_control_flow.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | for i in (1..5) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 50 - for i in (1..5) { [INFO] [stdout] 50 + for i in 1..5 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/chap3/e_control_flow.rs:127:16 [INFO] [stdout] | [INFO] [stdout] 127 | for num in (2..x+1){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 127 - for num in (2..x+1){ [INFO] [stdout] 127 + for num in 2..x+1 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::arch::x86_64::_mm256_castsi256_si128` [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::arch::x86_64::_mm256_castsi256_si128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let mut x = 5; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let mut x = 10; [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/chap3/a_variables_and_mutability.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | let mut x = 3; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chap3/c_functions.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let x = { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `chaos` [INFO] [stdout] --> src/chap3/e_control_flow.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let chaos = if number > 0 { "positive" } else { "negative" }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_chaos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `acc` [INFO] [stdout] --> src/chap3/e_control_flow.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let acc = loop { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_acc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let s = String::from("hello"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let r2 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | { let r1 = &mut s; } [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let r2 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r3` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let r3 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chap4/c_slice_type.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let word = first_word_len(&s); // word will get the value 5 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u2` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let u2 = User { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_u2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | let Point(x,y,z) =p; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | let Point(x,y,z) =p; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | let Point(x,y,z) =p; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:40:15 [INFO] [stdout] | [INFO] [stdout] 40 | let Color(r,g,b) = c; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `g` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | let Color(r,g,b) = c; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_g` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:40:19 [INFO] [stdout] | [INFO] [stdout] 40 | let Color(r,g,b) = c; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chap5/c_method_syntax.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let mut s2 = Rectangle::new(10, 5); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let x : u8 = 255; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let y : Option = Some(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `human` [INFO] [stdout] --> src/chap7/war.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let human = Human::new(Race::Asian, String::from("Lee"), 10); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_human` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let v=vec![Block::Float(1.1), Block::Integer(1), Block::Text(String::from("Hello"))]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `does_not_exist` [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let does_not_exist : Option<&i32> = v.get(100); // will return None [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_does_not_exist` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s1 = String::new(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let s2 = "string literal".to_string(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let s = format!("{}-{}-{}", s1, s2, s3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/chap8/c_storing_key_value_with_hashmap.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let score = scores.get(&team_name).copied().unwrap_or(0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let mut x = 5; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let mut x = 10; [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/chap3/a_variables_and_mutability.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | let mut x = 3; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chap3/c_functions.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let x = { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `chaos` [INFO] [stdout] --> src/chap3/e_control_flow.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let chaos = if number > 0 { "positive" } else { "negative" }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_chaos` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `acc` [INFO] [stdout] --> src/chap3/e_control_flow.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let acc = loop { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_acc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `variables_and_mutability_1` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn variables_and_mutability_1() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `variables_and_mutability_2` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn variables_and_mutability_2() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `THREE_HOURS_IN_SECONDS` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:22:7 [INFO] [stdout] | [INFO] [stdout] 22 | const THREE_HOURS_IN_SECONDS: u32 = 60 * 60 * 3; // const can not accompany with 'mut' keyword' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let s = String::from("hello"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shadowing` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn shadowing() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `statement_and_expression` is never used [INFO] [stdout] --> src/chap3/c_functions.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn statement_and_expression() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `functions_with_return_value` is never used [INFO] [stdout] --> src/chap3/c_functions.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn functions_with_return_value() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `five` is never used [INFO] [stdout] --> src/chap3/c_functions.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn five() -> u8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `if_traits` is never used [INFO] [stdout] --> src/chap3/e_control_flow.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn if_traits() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `repetition_with_while` is never used [INFO] [stdout] --> src/chap3/e_control_flow.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn repetition_with_while() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fibo_cache` is never used [INFO] [stdout] --> src/chap3/e_control_flow.rs:109:4 [INFO] [stdout] | [INFO] [stdout] 109 | fn fibo_cache(x:u32, cache: &mut HashMap) -> u128{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `heap_call_drop_to_clean` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn heap_call_drop_to_clean() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ownership_and_functions` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn ownership_and_functions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let r2 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | { let r1 = &mut s; } [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `takes_ownership` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn takes_ownership(str: String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `makes_copy` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn makes_copy(val : i32){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_values_and_scope` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn return_values_and_scope() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let r2 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gives_ownership` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn gives_ownership() -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `takes_and_gives_back` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn takes_and_gives_back(str: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `takes_and_get_length` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn takes_and_get_length(str:String) -> (String, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calc_length` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn calc_length(s : &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `borrowing_through_reference` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn borrowing_through_reference() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `valid_change` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn valid_change() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `invalid_change` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn invalid_change() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r3` [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let r3 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_dangle` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:76:4 [INFO] [stdout] | [INFO] [stdout] 76 | fn no_dangle() -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> src/chap4/c_slice_type.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn first_word(s : &str) -> &str{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 4 | age: u8 [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct Point(i32, i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Color` is never constructed [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | struct Color(i32, i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `destruct_tuple_struct` is never used [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn destruct_tuple_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AlwaysEqual` is never constructed [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | struct AlwaysEqual; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normal` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn normal() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_normal` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn area_normal(width: u16, height: u16)->u16 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `refactoring_with_tuple` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn refactoring_with_tuple() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_tuple` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn area_tuple(square : (u32,u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width` and `height` are never read [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 20 | struct Rectangle { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 21 | width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 22 | height: u32 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Rectangle` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `refactoring_with_struct` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn refactoring_with_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn area(rectangle: &Rectangle) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `area` is never used [INFO] [stdout] --> src/chap5/c_method_syntax.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 18 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 19 | fn area(self: &Self) -> u32 { // self: &Self === &self [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `V6` is never constructed [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 1 | enum IpAddrKind { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] 2 | V4(IpV4Addr), [INFO] [stdout] 3 | V6(IpV6Addr) [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chap4/c_slice_type.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let word = first_word_len(&s); // word will get the value 5 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 31 | impl IpV6Addr { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 32 | fn new(address: String) -> IpV6Addr { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `option_is_better_than_null` is never used [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn option_is_better_than_null() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Asian` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:2:6 [INFO] [stdout] | [INFO] [stdout] 2 | enum Asian { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl Asian { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 8 | fn name(&self) -> String { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Skin` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Skin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `people_skin_color` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn people_skin_color(skin: Skin) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `plus_two` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn plus_two(x: Option) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `only_two_and_seven` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn only_two_and_seven(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `if_let` is never used [INFO] [stdout] --> src/chap6/c_concise_flow_with_if_let.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn if_let() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/chap7/human.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Human { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 8 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `age` is never used [INFO] [stdout] --> src/chap7/human.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Human { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 14 | fn age(&self) -> u8{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Block` is never used [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:37:6 [INFO] [stdout] | [INFO] [stdout] 37 | enum Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `put_different_type_using_enum` is never used [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn put_different_type_using_enum() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ways_to_create_string` is never used [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn ways_to_create_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UniPoint` is never constructed [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct UniPoint{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Point{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `show_x` is never used [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl UniPoint { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] 25 | fn show_x(&self) -> &T{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `show_float_x` is never used [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 30 | impl UniPoint { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] 31 | fn show_float_x(&self) -> &f32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/chap3/e_control_flow.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | if num < 0 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/chap3/e_control_flow.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | if num < 0 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u2` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let u2 = User { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_u2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | let Point(x,y,z) =p; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:39:17 [INFO] [stdout] | [INFO] [stdout] 39 | let Point(x,y,z) =p; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | let Point(x,y,z) =p; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:40:15 [INFO] [stdout] | [INFO] [stdout] 40 | let Color(r,g,b) = c; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `g` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:40:17 [INFO] [stdout] | [INFO] [stdout] 40 | let Color(r,g,b) = c; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_g` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:40:19 [INFO] [stdout] | [INFO] [stdout] 40 | let Color(r,g,b) = c; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chap5/c_method_syntax.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let mut s2 = Rectangle::new(10, 5); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let x : u8 = 255; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let y : Option = Some(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `human` [INFO] [stdout] --> src/chap7/war.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let human = Human::new(Race::Asian, String::from("Lee"), 10); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_human` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let v=vec![Block::Float(1.1), Block::Integer(1), Block::Text(String::from("Hello"))]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `does_not_exist` [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let does_not_exist : Option<&i32> = v.get(100); // will return None [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_does_not_exist` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s1 = String::new(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let s2 = "string literal".to_string(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let s = format!("{}-{}-{}", s1, s2, s3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `score` [INFO] [stdout] --> src/chap8/c_storing_key_value_with_hashmap.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let score = scores.get(&team_name).copied().unwrap_or(0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `variables_and_mutability_1` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn variables_and_mutability_1() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `variables_and_mutability_2` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn variables_and_mutability_2() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `THREE_HOURS_IN_SECONDS` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:22:7 [INFO] [stdout] | [INFO] [stdout] 22 | const THREE_HOURS_IN_SECONDS: u32 = 60 * 60 * 3; // const can not accompany with 'mut' keyword' [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shadowing` is never used [INFO] [stdout] --> src/chap3/a_variables_and_mutability.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn shadowing() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `statement_and_expression` is never used [INFO] [stdout] --> src/chap3/c_functions.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn statement_and_expression() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `functions_with_return_value` is never used [INFO] [stdout] --> src/chap3/c_functions.rs:13:4 [INFO] [stdout] | [INFO] [stdout] 13 | fn functions_with_return_value() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `five` is never used [INFO] [stdout] --> src/chap3/c_functions.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn five() -> u8 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `if_traits` is never used [INFO] [stdout] --> src/chap3/e_control_flow.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn if_traits() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `repetition_with_while` is never used [INFO] [stdout] --> src/chap3/e_control_flow.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn repetition_with_while() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fibo_cache` is never used [INFO] [stdout] --> src/chap3/e_control_flow.rs:109:4 [INFO] [stdout] | [INFO] [stdout] 109 | fn fibo_cache(x:u32, cache: &mut HashMap) -> u128{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `heap_call_drop_to_clean` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn heap_call_drop_to_clean() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ownership_and_functions` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn ownership_and_functions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `takes_ownership` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn takes_ownership(str: String) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `makes_copy` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn makes_copy(val : i32){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_values_and_scope` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn return_values_and_scope() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gives_ownership` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn gives_ownership() -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `takes_and_gives_back` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn takes_and_gives_back(str: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `takes_and_get_length` is never used [INFO] [stdout] --> src/chap4/a_what_is_ownership.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn takes_and_get_length(str:String) -> (String, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calc_length` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn calc_length(s : &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `borrowing_through_reference` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn borrowing_through_reference() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `valid_change` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn valid_change() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `invalid_change` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn invalid_change() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_dangle` is never used [INFO] [stdout] --> src/chap4/b_references_and_borrowing.rs:76:4 [INFO] [stdout] | [INFO] [stdout] 76 | fn no_dangle() -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> src/chap4/c_slice_type.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn first_word(s : &str) -> &str{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 4 | age: u8 [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | struct Point(i32, i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Color` is never constructed [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | struct Color(i32, i32, i32); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `destruct_tuple_struct` is never used [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn destruct_tuple_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AlwaysEqual` is never constructed [INFO] [stdout] --> src/chap5/a_defining_and_instantiating_struct.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | struct AlwaysEqual; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `normal` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn normal() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_normal` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn area_normal(width: u16, height: u16)->u16 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `refactoring_with_tuple` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn refactoring_with_tuple() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_tuple` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn area_tuple(square : (u32,u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width` and `height` are never read [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 20 | struct Rectangle { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 21 | width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 22 | height: u32 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Rectangle` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `refactoring_with_struct` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn refactoring_with_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area` is never used [INFO] [stdout] --> src/chap5/b_program_using_struct.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn area(rectangle: &Rectangle) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `area` is never used [INFO] [stdout] --> src/chap5/c_method_syntax.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 18 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 19 | fn area(self: &Self) -> u32 { // self: &Self === &self [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `V6` is never constructed [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 1 | enum IpAddrKind { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] 2 | V4(IpV4Addr), [INFO] [stdout] 3 | V6(IpV6Addr) [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 31 | impl IpV6Addr { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 32 | fn new(address: String) -> IpV6Addr { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `option_is_better_than_null` is never used [INFO] [stdout] --> src/chap6/a_defining_an_enum.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn option_is_better_than_null() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Asian` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:2:6 [INFO] [stdout] | [INFO] [stdout] 2 | enum Asian { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl Asian { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] 8 | fn name(&self) -> String { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Skin` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:16:6 [INFO] [stdout] | [INFO] [stdout] 16 | enum Skin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `people_skin_color` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn people_skin_color(skin: Skin) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `plus_two` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn plus_two(x: Option) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `only_two_and_seven` is never used [INFO] [stdout] --> src/chap6/b_match_control_flow.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn only_two_and_seven(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `if_let` is never used [INFO] [stdout] --> src/chap6/c_concise_flow_with_if_let.rs:10:4 [INFO] [stdout] | [INFO] [stdout] 10 | fn if_let() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/chap7/human.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 5 | pub struct Human { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] ... [INFO] [stdout] 8 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `age` is never used [INFO] [stdout] --> src/chap7/human.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 10 | impl Human { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 14 | fn age(&self) -> u8{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Block` is never used [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:37:6 [INFO] [stdout] | [INFO] [stdout] 37 | enum Block { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `put_different_type_using_enum` is never used [INFO] [stdout] --> src/chap8/a_storing_lists_of_value.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | fn put_different_type_using_enum() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ways_to_create_string` is never used [INFO] [stdout] --> src/chap8/b_utf8_enocoded_string.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn ways_to_create_string() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UniPoint` is never constructed [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct UniPoint{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | struct Point{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `show_x` is never used [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl UniPoint { [INFO] [stdout] | ------------------- method in this implementation [INFO] [stdout] 25 | fn show_x(&self) -> &T{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `show_float_x` is never used [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 30 | impl UniPoint { [INFO] [stdout] | ------------------ method in this implementation [INFO] [stdout] 31 | fn show_float_x(&self) -> &f32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point2D` is never constructed [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 37 | struct Point2D{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mix_up` is never used [INFO] [stdout] --> src/chap10/a_generic_data_types.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 42 | impl Point2D{ [INFO] [stdout] | -------------------------- method in this implementation [INFO] [stdout] 43 | fn mix_up(self, other: Point2D) -> Point2D{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/chap3/e_control_flow.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | if num < 0 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/chap3/e_control_flow.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | if num < 0 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap2::guess::run_game` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rust_book::chap2::guess::run_game; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap3::a_variables_and_mutability::execute` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use rust_book::chap3::a_variables_and_mutability::execute; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap3::b_data_types::tuple_types` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rust_book::chap3::b_data_types::tuple_types; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `fibo_cache_client`, `fibo_client`, `repetition_with_for`, and `repetition_with_loop` [INFO] [stdout] --> src/main.rs:4:40 [INFO] [stdout] | [INFO] [stdout] 4 | use rust_book::chap3::e_control_flow::{fibo_cache_client, fibo_client, repetition_with_for, repetition_with_loop}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap4::a_what_is_ownership::heap_data` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rust_book::chap4::a_what_is_ownership::heap_data; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `valid_change_with_multiple_mutable_references1`, `valid_change_with_multiple_mutable_references2`, and `valid_multiple_references` [INFO] [stdout] --> src/main.rs:6:52 [INFO] [stdout] | [INFO] [stdout] 6 | ...ing::{valid_change_with_multiple_mutable_references2, valid_change_with_multiple_mutable_references1, valid_multiple_references}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `invalid_length` and `show_sliced_array` [INFO] [stdout] --> src/main.rs:7:38 [INFO] [stdout] | [INFO] [stdout] 7 | use rust_book::chap4::c_slice_type::{invalid_length, show_sliced_array}; [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap5::b_program_using_struct::show_rect` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use rust_book::chap5::b_program_using_struct::show_rect; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap5::c_method_syntax::method_test` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use rust_book::chap5::c_method_syntax::method_test; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap6::a_defining_an_enum::show_enum` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rust_book::chap6::a_defining_an_enum::show_enum; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `get_element_test`, `prac_iter_vector`, `update_vector`, and `vector_define` [INFO] [stdout] --> src/main.rs:11:50 [INFO] [stdout] | [INFO] [stdout] 11 | use rust_book::chap8::a_storing_lists_of_value::{get_element_test, prac_iter_vector, update_vector, vector_define}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `indexing_string` and `update_string` [INFO] [stdout] --> src/main.rs:12:48 [INFO] [stdout] | [INFO] [stdout] 12 | use rust_book::chap8::b_utf8_enocoded_string::{indexing_string, update_string}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `create_and_access` [INFO] [stdout] --> src/main.rs:13:58 [INFO] [stdout] | [INFO] [stdout] 13 | use rust_book::chap8::c_storing_key_value_with_hashmap::{create_and_access, update_test}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap2::guess::run_game` [INFO] [stdout] --> src/main.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rust_book::chap2::guess::run_game; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap3::a_variables_and_mutability::execute` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use rust_book::chap3::a_variables_and_mutability::execute; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap3::b_data_types::tuple_types` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rust_book::chap3::b_data_types::tuple_types; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `fibo_cache_client`, `fibo_client`, `repetition_with_for`, and `repetition_with_loop` [INFO] [stdout] --> src/main.rs:4:40 [INFO] [stdout] | [INFO] [stdout] 4 | use rust_book::chap3::e_control_flow::{fibo_cache_client, fibo_client, repetition_with_for, repetition_with_loop}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap4::a_what_is_ownership::heap_data` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use rust_book::chap4::a_what_is_ownership::heap_data; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `valid_change_with_multiple_mutable_references1`, `valid_change_with_multiple_mutable_references2`, and `valid_multiple_references` [INFO] [stdout] --> src/main.rs:6:52 [INFO] [stdout] | [INFO] [stdout] 6 | ...ing::{valid_change_with_multiple_mutable_references2, valid_change_with_multiple_mutable_references1, valid_multiple_references}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `invalid_length` and `show_sliced_array` [INFO] [stdout] --> src/main.rs:7:38 [INFO] [stdout] | [INFO] [stdout] 7 | use rust_book::chap4::c_slice_type::{invalid_length, show_sliced_array}; [INFO] [stdout] | ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap5::b_program_using_struct::show_rect` [INFO] [stdout] --> src/main.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use rust_book::chap5::b_program_using_struct::show_rect; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap5::c_method_syntax::method_test` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | use rust_book::chap5::c_method_syntax::method_test; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_book::chap6::a_defining_an_enum::show_enum` [INFO] [stdout] --> src/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rust_book::chap6::a_defining_an_enum::show_enum; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `get_element_test`, `prac_iter_vector`, `update_vector`, and `vector_define` [INFO] [stdout] --> src/main.rs:11:50 [INFO] [stdout] | [INFO] [stdout] 11 | use rust_book::chap8::a_storing_lists_of_value::{get_element_test, prac_iter_vector, update_vector, vector_define}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `indexing_string` and `update_string` [INFO] [stdout] --> src/main.rs:12:48 [INFO] [stdout] | [INFO] [stdout] 12 | use rust_book::chap8::b_utf8_enocoded_string::{indexing_string, update_string}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `create_and_access` [INFO] [stdout] --> src/main.rs:13:58 [INFO] [stdout] | [INFO] [stdout] 13 | use rust_book::chap8::c_storing_key_value_with_hashmap::{create_and_access, update_test}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.74s [INFO] running `Command { std: "docker" "inspect" "f0fa4d4ca1c7bd3b1f1584cca422344cce1a8a4fcc84361de7c1a74407ff5643", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f0fa4d4ca1c7bd3b1f1584cca422344cce1a8a4fcc84361de7c1a74407ff5643", kill_on_drop: false }` [INFO] [stdout] f0fa4d4ca1c7bd3b1f1584cca422344cce1a8a4fcc84361de7c1a74407ff5643