[INFO] cloning repository https://github.com/mihastele/the-rust-programming-langyage-exercises [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mihastele/the-rust-programming-langyage-exercises" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmihastele%2Fthe-rust-programming-langyage-exercises", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmihastele%2Fthe-rust-programming-langyage-exercises'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 555b667eb4d3d8d5ca774d58930673a56a2792b4 [INFO] building mihastele/the-rust-programming-langyage-exercises against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmihastele%2Fthe-rust-programming-langyage-exercises" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/mihastele/the-rust-programming-langyage-exercises on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/mihastele/the-rust-programming-langyage-exercises [INFO] finished tweaking git repo https://github.com/mihastele/the-rust-programming-langyage-exercises [INFO] tweaked toml for git repo https://github.com/mihastele/the-rust-programming-langyage-exercises written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/mihastele/the-rust-programming-langyage-exercises 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0b31e2202d55b78d8bc5f690f25b884beb88449bb40ec930aef48cdffef2a55f [INFO] running `Command { std: "docker" "start" "-a" "0b31e2202d55b78d8bc5f690f25b884beb88449bb40ec930aef48cdffef2a55f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0b31e2202d55b78d8bc5f690f25b884beb88449bb40ec930aef48cdffef2a55f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0b31e2202d55b78d8bc5f690f25b884beb88449bb40ec930aef48cdffef2a55f", kill_on_drop: false }` [INFO] [stdout] 0b31e2202d55b78d8bc5f690f25b884beb88449bb40ec930aef48cdffef2a55f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 74ae1450cc36a0e652a29055e5b45a1bc3d905749303d386827f139fd0a8c63c [INFO] running `Command { std: "docker" "start" "-a" "74ae1450cc36a0e652a29055e5b45a1bc3d905749303d386827f139fd0a8c63c", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.17 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling therustbook v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Debug` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/chapter15_smart_pointers.rs:320:68 [INFO] [stdout] | [INFO] [stdout] 320 | println!("leaf parent = {:?}", leaf.parent.borrow().upgrade());; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/chapter9_errors.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | panic!("crash and burn"); [INFO] [stdout] | ------------------------ any code following this expression is unreachable [INFO] [stdout] 7 | [INFO] [stdout] 8 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `guess` [INFO] [stdout] --> src/chapter3_concepts.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let guess: u64 = "42".parse().expect("Not a number!"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_guess` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chapter3_concepts.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let x = 2.0; // f64 [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/chapter3_concepts.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let y: f32 = 3.0; // f32, all floating points are signed [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sum` [INFO] [stdout] --> src/chapter3_concepts.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let sum = 5 + 10; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sum` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `difference` [INFO] [stdout] --> src/chapter3_concepts.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let difference = 95.5 - 4.3; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_difference` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `product` [INFO] [stdout] --> src/chapter3_concepts.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let product = 4 * 30; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_product` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `quotient` [INFO] [stdout] --> src/chapter3_concepts.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let quotient = 56.7 / 32.2; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_quotient` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `truncated` [INFO] [stdout] --> src/chapter3_concepts.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let truncated = -5 / 3; // Results in -1 [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_truncated` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `remainder` [INFO] [stdout] --> src/chapter3_concepts.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let remainder = 43 % 5; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_remainder` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/chapter3_concepts.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let t = true; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/chapter3_concepts.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let f: bool = false; // with explicit type annotation [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/chapter3_concepts.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let c = 'z'; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chapter3_concepts.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let z: char = 'ℤ'; // with explicit type annotation [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heart_eyed_cat` [INFO] [stdout] --> src/chapter3_concepts.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let heart_eyed_cat = '😻'; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heart_eyed_cat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tup` [INFO] [stdout] --> src/chapter3_concepts.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let tup: (i32, f64, u8) = (500, 6.4, 1); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_tup` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chapter3_concepts.rs:75:10 [INFO] [stdout] | [INFO] [stdout] 75 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chapter3_concepts.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `five_hundred` [INFO] [stdout] --> src/chapter3_concepts.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | let five_hundred = x.0; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_five_hundred` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six_point_four` [INFO] [stdout] --> src/chapter3_concepts.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let six_point_four = x.1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_six_point_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/chapter3_concepts.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | let one = x.2; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let a = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/chapter3_concepts.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let months = ["January", "February", "March", "April", "May", "June", "July", [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let a: [i32; 5] = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let a = [3; 5]; // [3, 3, 3, 3, 3] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/chapter3_concepts.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | let first = a[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second` [INFO] [stdout] --> src/chapter3_concepts.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | let second = a[1]; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_second` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/chapter4_ownership.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let s1 = gives_ownership(); // gives_ownership moves its return [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/chapter4_ownership.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let s3 = takes_and_gives_back(s2); // s2 is moved into [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chapter4_ownership.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | 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/chapter4_ownership.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | 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/chapter4_ownership.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let r1 = &s; // no problem [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/chapter4_ownership.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | let r2 = &s; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chapter4_ownership.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | let mut s = String::from("hello"); [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: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:187:9 [INFO] [stdout] | [INFO] [stdout] 187 | let word = first_word(&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: `hello` [INFO] [stdout] --> src/chapter4_ownership.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | let hello = &s[0..5]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/chapter4_ownership.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | let world = &s[6..11]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let slice = &s[0..2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | let slice = &s[..2]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let slice = &s[3..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | let slice = &s[3..]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | let slice = &s[0..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | let slice = &s[..]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter4_ownership.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | let s = "Hello, world!"; // String literal, immutable string [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:237:9 [INFO] [stdout] | [INFO] [stdout] 237 | let word = first_word_slice(&my_string[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | let word = first_word_slice(&my_string[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | let word = first_word_slice(&my_string); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | let word = first_word_slice(&my_string_literal[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | let word = first_word_slice(&my_string_literal[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let word = first_word_slice(my_string_literal); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter4_ownership.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | let a = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/chapter5_structs.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let user1 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/chapter5_structs.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/chapter5_structs.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/chapter5_structs.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let origin = Point(0, 0, 0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `subject` [INFO] [stdout] --> src/chapter5_structs.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let subject = AlwaysEqual; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subject` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let four = IpAddrKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let six = IpAddrKind::V6; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let home = IpAddr { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let loopback = IpAddr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let home = IpAddrEnum::V4(String::from("127.0.0.1")); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let loopback = IpAddrEnum::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let home = IpAddrEnum2::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let loopback = IpAddrEnum2::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_char` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let some_char = Some('e'); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_spaces` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 114 | fn move_player(num_spaces: u8) {} [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_spaces` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | count += 1; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter8_collections.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter8_collections.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `s` is assigned to, but never used [INFO] [stdout] --> src/chapter8_collections.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | let mut s = String::new(); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_s` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `s` is never read [INFO] [stdout] --> src/chapter8_collections.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | s = data.to_string(); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let s = String::from("initial contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/chapter8_collections.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let s3 = s1 + &s2; // note s1 has been moved here and can no longer be used [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let s = 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: `s` [INFO] [stdout] --> src/chapter8_collections.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | 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/chapter8_collections.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | 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: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let greeting_file = match f { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let greeting_file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let greeting_file = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let greeting_file = File::open("hello.txt") [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_integer` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let both_integer = Point2 { x: 5, y: 4 }; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let both_float = Point2 { x: 5.0, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer_and_float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let integer_and_float = Point2 { x: 5, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer_and_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:161:28 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn notifyWithTwoTraits(item: &(impl Summary + Display)) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expensive_closure` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let expensive_closure = |num: u32| -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expensive_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let s = example_closure(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: `c` [INFO] [stdout] --> src/chapter15_smart_pointers.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let c = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/chapter15_smart_pointers.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | let d = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_dangle` is never used [INFO] [stdout] --> src/chapter4_ownership.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | fn no_dangle() -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active`, `username`, and `sign_in_count` are never read [INFO] [stdout] --> src/chapter5_structs.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 2 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 3 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 4 | email: String, [INFO] [stdout] 5 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/chapter5_structs.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/chapter5_structs.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | struct Point(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user` is never used [INFO] [stdout] --> src/chapter5_structs.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user_with_shorthand` is never used [INFO] [stdout] --> src/chapter5_structs.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn build_user_with_shorthand(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_w_tuples` is never used [INFO] [stdout] --> src/chapter5_structs.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn area_w_tuples(dimensions: (u32, u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `can_hold` and `square` are never used [INFO] [stdout] --> src/chapter5_structs.rs:146:8 [INFO] [stdout] | [INFO] [stdout] 141 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 146 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | fn square(size: u32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `kind` and `address` are never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | struct IpAddr { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 10 | kind: IpAddrKind, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | V4(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 26 | V4(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | V6(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 27 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, `2`, and `3` are never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | V4(u8, u8, u8, u8), [INFO] [stdout] | -- ^^ ^^ ^^ ^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 34 | V4((), (), (), ()), [INFO] [stdout] | ~~ ~~ ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | V6(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 35 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:45:11 [INFO] [stdout] | [INFO] [stdout] 45 | Write(String), [INFO] [stdout] | ----- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 45 | Write(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 43 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 44 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 45 | Write(String), [INFO] [stdout] 46 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `QuitMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | struct QuitMessage; // unit struct [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MoveMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | struct MoveMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WriteMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | struct WriteMessage(String); // tuple struct [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChangeColorMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 65 | struct ChangeColorMessage(i32, i32, i32); // tuple struct [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ipv4Addr` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | struct Ipv4Addr { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ipv6Addr` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | struct Ipv6Addr { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `IpAddr` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:85:6 [INFO] [stdout] | [INFO] [stdout] 85 | enum IpAddr { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Coin` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:117:6 [INFO] [stdout] | [INFO] [stdout] 117 | enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `value_in_cents` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Alabama` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 137 | enum UsState { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 138 | 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] [INFO] [stdout] [INFO] [stdout] warning: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 143 | enum UsCoin { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 144 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 145 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 146 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deliver_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn deliver_order() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_incorrect_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cook_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seasonal_fruit` is never read [INFO] [stdout] --> src/chapter7_packaging.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct Breakfast { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 37 | pub toast: String, [INFO] [stdout] 38 | seasonal_fruit: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file` is never used [INFO] [stdout] --> src/chapter9_errors.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file2` is never used [INFO] [stdout] --> src/chapter9_errors.rs:80:4 [INFO] [stdout] | [INFO] [stdout] 80 | fn read_username_from_file2() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file3` is never used [INFO] [stdout] --> src/chapter9_errors.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn read_username_from_file3() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file4_shortest` is never used [INFO] [stdout] --> src/chapter9_errors.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn read_username_from_file4_shortest() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `last_char_of_first_line` is never used [INFO] [stdout] --> src/chapter9_errors.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn last_char_of_first_line(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_i32` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn largest_i32(list: &[i32]) -> &i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_char` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn largest_char(list: &[char]) -> &char { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 54 | struct Point2 { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 55 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 56 | y: U, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 59 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 60 | x: T, [INFO] [stdout] 61 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `distance_from_origin` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 71 | impl Point { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 72 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Option` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:78:6 [INFO] [stdout] | [INFO] [stdout] 78 | enum Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_summarizable` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:181:4 [INFO] [stdout] | [INFO] [stdout] 181 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:192:8 [INFO] [stdout] | [INFO] [stdout] 192 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:198:8 [INFO] [stdout] | [INFO] [stdout] 197 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 198 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:204:8 [INFO] [stdout] | [INFO] [stdout] 203 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 204 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_one_v1` is never used [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | fn add_one_v1 (x: u32) -> u32 { x + 1 } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `height` is never read [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 134 | struct Rectangle { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 135 | width: u32, [INFO] [stdout] 136 | 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: struct `Shoe` is never constructed [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:190:8 [INFO] [stdout] | [INFO] [stdout] 190 | struct Shoe { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shoes_in_size` is never used [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:195:4 [INFO] [stdout] | [INFO] [stdout] 195 | fn shoes_in_size(shoes: Vec, shoe_size: u32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/chapter15_smart_pointers.rs:237:10 [INFO] [stdout] | [INFO] [stdout] 237 | Cons(Rc>, Rc), [INFO] [stdout] | ---- ^^^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `List` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 237 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RefCycleList` is never used [INFO] [stdout] --> src/chapter15_smart_pointers.rs:257:6 [INFO] [stdout] | [INFO] [stdout] 257 | enum RefCycleList { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `tail` is never used [INFO] [stdout] --> src/chapter15_smart_pointers.rs:263:8 [INFO] [stdout] | [INFO] [stdout] 262 | impl RefCycleList { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] 263 | fn tail(&self) -> Option<&RefCell>> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `value` and `children` are never read [INFO] [stdout] --> src/chapter15_smart_pointers.rs:274:5 [INFO] [stdout] | [INFO] [stdout] 273 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 274 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 275 | parent: RefCell>, [INFO] [stdout] 276 | children: RefCell>>, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` 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 `notifyOriginal` should have a snake case name [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn notifyOriginal(item: &T) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `notify_original` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notifyWithTwoTraits` should have a snake case name [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn notifyWithTwoTraits(item: &(impl Summary + Display)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `notify_with_two_traits` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.57s [INFO] running `Command { std: "docker" "inspect" "74ae1450cc36a0e652a29055e5b45a1bc3d905749303d386827f139fd0a8c63c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "74ae1450cc36a0e652a29055e5b45a1bc3d905749303d386827f139fd0a8c63c", kill_on_drop: false }` [INFO] [stdout] 74ae1450cc36a0e652a29055e5b45a1bc3d905749303d386827f139fd0a8c63c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e5b383b63b2ef5e5ad451d2482548fdc6614a02f2cedba5953941269e69f2103 [INFO] running `Command { std: "docker" "start" "-a" "e5b383b63b2ef5e5ad451d2482548fdc6614a02f2cedba5953941269e69f2103", kill_on_drop: false }` [INFO] [stdout] warning: unused import: `Debug` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/chapter15_smart_pointers.rs:320:68 [INFO] [stdout] | [INFO] [stdout] 320 | println!("leaf parent = {:?}", leaf.parent.borrow().upgrade());; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/chapter9_errors.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | panic!("crash and burn"); [INFO] [stdout] | ------------------------ any code following this expression is unreachable [INFO] [stdout] 7 | [INFO] [stdout] 8 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `guess` [INFO] [stdout] --> src/chapter3_concepts.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let guess: u64 = "42".parse().expect("Not a number!"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_guess` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chapter3_concepts.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let x = 2.0; // f64 [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/chapter3_concepts.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let y: f32 = 3.0; // f32, all floating points are signed [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sum` [INFO] [stdout] --> src/chapter3_concepts.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let sum = 5 + 10; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sum` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `difference` [INFO] [stdout] --> src/chapter3_concepts.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let difference = 95.5 - 4.3; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_difference` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `product` [INFO] [stdout] --> src/chapter3_concepts.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let product = 4 * 30; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_product` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `quotient` [INFO] [stdout] --> src/chapter3_concepts.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let quotient = 56.7 / 32.2; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_quotient` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `truncated` [INFO] [stdout] --> src/chapter3_concepts.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let truncated = -5 / 3; // Results in -1 [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_truncated` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `remainder` [INFO] [stdout] --> src/chapter3_concepts.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let remainder = 43 % 5; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_remainder` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/chapter3_concepts.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let t = true; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/chapter3_concepts.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let f: bool = false; // with explicit type annotation [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/chapter3_concepts.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let c = 'z'; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chapter3_concepts.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let z: char = 'ℤ'; // with explicit type annotation [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heart_eyed_cat` [INFO] [stdout] --> src/chapter3_concepts.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let heart_eyed_cat = '😻'; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heart_eyed_cat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tup` [INFO] [stdout] --> src/chapter3_concepts.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let tup: (i32, f64, u8) = (500, 6.4, 1); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_tup` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chapter3_concepts.rs:75:10 [INFO] [stdout] | [INFO] [stdout] 75 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chapter3_concepts.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `five_hundred` [INFO] [stdout] --> src/chapter3_concepts.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | let five_hundred = x.0; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_five_hundred` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six_point_four` [INFO] [stdout] --> src/chapter3_concepts.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let six_point_four = x.1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_six_point_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/chapter3_concepts.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | let one = x.2; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let a = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/chapter3_concepts.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let months = ["January", "February", "March", "April", "May", "June", "July", [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let a: [i32; 5] = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let a = [3; 5]; // [3, 3, 3, 3, 3] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/chapter3_concepts.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | let first = a[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second` [INFO] [stdout] --> src/chapter3_concepts.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | let second = a[1]; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_second` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/chapter4_ownership.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let s1 = gives_ownership(); // gives_ownership moves its return [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/chapter4_ownership.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let s3 = takes_and_gives_back(s2); // s2 is moved into [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chapter4_ownership.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | 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/chapter4_ownership.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | 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/chapter4_ownership.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let r1 = &s; // no problem [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/chapter4_ownership.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | let r2 = &s; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chapter4_ownership.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | let mut s = String::from("hello"); [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: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:187:9 [INFO] [stdout] | [INFO] [stdout] 187 | let word = first_word(&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: `hello` [INFO] [stdout] --> src/chapter4_ownership.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | let hello = &s[0..5]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/chapter4_ownership.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | let world = &s[6..11]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let slice = &s[0..2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | let slice = &s[..2]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let slice = &s[3..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | let slice = &s[3..]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | let slice = &s[0..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | let slice = &s[..]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter4_ownership.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | let s = "Hello, world!"; // String literal, immutable string [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:237:9 [INFO] [stdout] | [INFO] [stdout] 237 | let word = first_word_slice(&my_string[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | let word = first_word_slice(&my_string[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | let word = first_word_slice(&my_string); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | let word = first_word_slice(&my_string_literal[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | let word = first_word_slice(&my_string_literal[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let word = first_word_slice(my_string_literal); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter4_ownership.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | let a = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/chapter5_structs.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let user1 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/chapter5_structs.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/chapter5_structs.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/chapter5_structs.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let origin = Point(0, 0, 0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `subject` [INFO] [stdout] --> src/chapter5_structs.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let subject = AlwaysEqual; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subject` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let four = IpAddrKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let six = IpAddrKind::V6; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let home = IpAddr { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let loopback = IpAddr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let home = IpAddrEnum::V4(String::from("127.0.0.1")); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let loopback = IpAddrEnum::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let home = IpAddrEnum2::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let loopback = IpAddrEnum2::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_char` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let some_char = Some('e'); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_spaces` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 114 | fn move_player(num_spaces: u8) {} [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_spaces` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | count += 1; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter8_collections.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter8_collections.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `s` is assigned to, but never used [INFO] [stdout] --> src/chapter8_collections.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | let mut s = String::new(); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_s` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `s` is never read [INFO] [stdout] --> src/chapter8_collections.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | s = data.to_string(); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let s = String::from("initial contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/chapter8_collections.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let s3 = s1 + &s2; // note s1 has been moved here and can no longer be used [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let s = 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: `s` [INFO] [stdout] --> src/chapter8_collections.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | 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/chapter8_collections.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | 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: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let greeting_file = match f { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let greeting_file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let greeting_file = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let greeting_file = File::open("hello.txt") [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_integer` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let both_integer = Point2 { x: 5, y: 4 }; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let both_float = Point2 { x: 5.0, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer_and_float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let integer_and_float = Point2 { x: 5, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer_and_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:161:28 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn notifyWithTwoTraits(item: &(impl Summary + Display)) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expensive_closure` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let expensive_closure = |num: u32| -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expensive_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let s = example_closure(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: `c` [INFO] [stdout] --> src/chapter15_smart_pointers.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let c = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/chapter15_smart_pointers.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | let d = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_dangle` is never used [INFO] [stdout] --> src/chapter4_ownership.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | fn no_dangle() -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active`, `username`, and `sign_in_count` are never read [INFO] [stdout] --> src/chapter5_structs.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 2 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 3 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 4 | email: String, [INFO] [stdout] 5 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/chapter5_structs.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/chapter5_structs.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | struct Point(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user` is never used [INFO] [stdout] --> src/chapter5_structs.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user_with_shorthand` is never used [INFO] [stdout] --> src/chapter5_structs.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn build_user_with_shorthand(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_w_tuples` is never used [INFO] [stdout] --> src/chapter5_structs.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn area_w_tuples(dimensions: (u32, u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `can_hold` and `square` are never used [INFO] [stdout] --> src/chapter5_structs.rs:146:8 [INFO] [stdout] | [INFO] [stdout] 141 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 146 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | fn square(size: u32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `kind` and `address` are never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | struct IpAddr { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 10 | kind: IpAddrKind, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | V4(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 26 | V4(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | V6(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 27 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, `2`, and `3` are never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | V4(u8, u8, u8, u8), [INFO] [stdout] | -- ^^ ^^ ^^ ^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 34 | V4((), (), (), ()), [INFO] [stdout] | ~~ ~~ ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | V6(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 35 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:45:11 [INFO] [stdout] | [INFO] [stdout] 45 | Write(String), [INFO] [stdout] | ----- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 45 | Write(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 43 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 44 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 45 | Write(String), [INFO] [stdout] 46 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `QuitMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | struct QuitMessage; // unit struct [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MoveMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | struct MoveMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WriteMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | struct WriteMessage(String); // tuple struct [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChangeColorMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 65 | struct ChangeColorMessage(i32, i32, i32); // tuple struct [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling therustbook v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: struct `Ipv4Addr` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | struct Ipv4Addr { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ipv6Addr` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | struct Ipv6Addr { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `IpAddr` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:85:6 [INFO] [stdout] | [INFO] [stdout] 85 | enum IpAddr { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Coin` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:117:6 [INFO] [stdout] | [INFO] [stdout] 117 | enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `value_in_cents` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Alabama` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 137 | enum UsState { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 138 | 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] [INFO] [stdout] [INFO] [stdout] warning: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 143 | enum UsCoin { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 144 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 145 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 146 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deliver_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn deliver_order() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_incorrect_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cook_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seasonal_fruit` is never read [INFO] [stdout] --> src/chapter7_packaging.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct Breakfast { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 37 | pub toast: String, [INFO] [stdout] 38 | seasonal_fruit: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file` is never used [INFO] [stdout] --> src/chapter9_errors.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file2` is never used [INFO] [stdout] --> src/chapter9_errors.rs:80:4 [INFO] [stdout] | [INFO] [stdout] 80 | fn read_username_from_file2() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file3` is never used [INFO] [stdout] --> src/chapter9_errors.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn read_username_from_file3() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file4_shortest` is never used [INFO] [stdout] --> src/chapter9_errors.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn read_username_from_file4_shortest() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `last_char_of_first_line` is never used [INFO] [stdout] --> src/chapter9_errors.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn last_char_of_first_line(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_i32` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn largest_i32(list: &[i32]) -> &i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_char` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn largest_char(list: &[char]) -> &char { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 54 | struct Point2 { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 55 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 56 | y: U, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 59 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 60 | x: T, [INFO] [stdout] 61 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `distance_from_origin` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 71 | impl Point { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 72 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Option` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:78:6 [INFO] [stdout] | [INFO] [stdout] 78 | enum Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_summarizable` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:181:4 [INFO] [stdout] | [INFO] [stdout] 181 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:192:8 [INFO] [stdout] | [INFO] [stdout] 192 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:198:8 [INFO] [stdout] | [INFO] [stdout] 197 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 198 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:204:8 [INFO] [stdout] | [INFO] [stdout] 203 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 204 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_one_v1` is never used [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | fn add_one_v1 (x: u32) -> u32 { x + 1 } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `height` is never read [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 134 | struct Rectangle { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 135 | width: u32, [INFO] [stdout] 136 | 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: struct `Shoe` is never constructed [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:190:8 [INFO] [stdout] | [INFO] [stdout] 190 | struct Shoe { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shoes_in_size` is never used [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:195:4 [INFO] [stdout] | [INFO] [stdout] 195 | fn shoes_in_size(shoes: Vec, shoe_size: u32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/chapter15_smart_pointers.rs:237:10 [INFO] [stdout] | [INFO] [stdout] 237 | Cons(Rc>, Rc), [INFO] [stdout] | ---- ^^^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `List` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 237 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RefCycleList` is never used [INFO] [stdout] --> src/chapter15_smart_pointers.rs:257:6 [INFO] [stdout] | [INFO] [stdout] 257 | enum RefCycleList { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `tail` is never used [INFO] [stdout] --> src/chapter15_smart_pointers.rs:263:8 [INFO] [stdout] | [INFO] [stdout] 262 | impl RefCycleList { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] 263 | fn tail(&self) -> Option<&RefCell>> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `value` and `children` are never read [INFO] [stdout] --> src/chapter15_smart_pointers.rs:274:5 [INFO] [stdout] | [INFO] [stdout] 273 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 274 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 275 | parent: RefCell>, [INFO] [stdout] 276 | children: RefCell>>, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` 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 `notifyOriginal` should have a snake case name [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn notifyOriginal(item: &T) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `notify_original` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notifyWithTwoTraits` should have a snake case name [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn notifyWithTwoTraits(item: &(impl Summary + Display)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `notify_with_two_traits` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Debug` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::{Debug, Display}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/chapter15_smart_pointers.rs:320:68 [INFO] [stdout] | [INFO] [stdout] 320 | println!("leaf parent = {:?}", leaf.parent.borrow().upgrade());; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/chapter9_errors.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 6 | panic!("crash and burn"); [INFO] [stdout] | ------------------------ any code following this expression is unreachable [INFO] [stdout] 7 | [INFO] [stdout] 8 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `guess` [INFO] [stdout] --> src/chapter3_concepts.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let guess: u64 = "42".parse().expect("Not a number!"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_guess` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chapter3_concepts.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let x = 2.0; // f64 [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/chapter3_concepts.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let y: f32 = 3.0; // f32, all floating points are signed [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sum` [INFO] [stdout] --> src/chapter3_concepts.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let sum = 5 + 10; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sum` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `difference` [INFO] [stdout] --> src/chapter3_concepts.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let difference = 95.5 - 4.3; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_difference` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `product` [INFO] [stdout] --> src/chapter3_concepts.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let product = 4 * 30; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_product` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `quotient` [INFO] [stdout] --> src/chapter3_concepts.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let quotient = 56.7 / 32.2; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_quotient` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `truncated` [INFO] [stdout] --> src/chapter3_concepts.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let truncated = -5 / 3; // Results in -1 [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_truncated` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `remainder` [INFO] [stdout] --> src/chapter3_concepts.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let remainder = 43 % 5; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_remainder` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/chapter3_concepts.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let t = true; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/chapter3_concepts.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let f: bool = false; // with explicit type annotation [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/chapter3_concepts.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let c = 'z'; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chapter3_concepts.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let z: char = 'ℤ'; // with explicit type annotation [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heart_eyed_cat` [INFO] [stdout] --> src/chapter3_concepts.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let heart_eyed_cat = '😻'; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heart_eyed_cat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tup` [INFO] [stdout] --> src/chapter3_concepts.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let tup: (i32, f64, u8) = (500, 6.4, 1); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_tup` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/chapter3_concepts.rs:75:10 [INFO] [stdout] | [INFO] [stdout] 75 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/chapter3_concepts.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 75 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `five_hundred` [INFO] [stdout] --> src/chapter3_concepts.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | let five_hundred = x.0; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_five_hundred` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six_point_four` [INFO] [stdout] --> src/chapter3_concepts.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let six_point_four = x.1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_six_point_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/chapter3_concepts.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | let one = x.2; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let a = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/chapter3_concepts.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let months = ["January", "February", "March", "April", "May", "June", "July", [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | let a: [i32; 5] = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter3_concepts.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let a = [3; 5]; // [3, 3, 3, 3, 3] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/chapter3_concepts.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | let first = a[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `second` [INFO] [stdout] --> src/chapter3_concepts.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | let second = a[1]; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_second` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/chapter4_ownership.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let s1 = gives_ownership(); // gives_ownership moves its return [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/chapter4_ownership.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let s3 = takes_and_gives_back(s2); // s2 is moved into [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/chapter4_ownership.rs:117:13 [INFO] [stdout] | [INFO] [stdout] 117 | 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/chapter4_ownership.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | 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/chapter4_ownership.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let r1 = &s; // no problem [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/chapter4_ownership.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | let r2 = &s; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chapter4_ownership.rs:124:9 [INFO] [stdout] | [INFO] [stdout] 124 | let mut s = String::from("hello"); [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: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:187:9 [INFO] [stdout] | [INFO] [stdout] 187 | let word = first_word(&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: `hello` [INFO] [stdout] --> src/chapter4_ownership.rs:201:9 [INFO] [stdout] | [INFO] [stdout] 201 | let hello = &s[0..5]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/chapter4_ownership.rs:202:9 [INFO] [stdout] | [INFO] [stdout] 202 | let world = &s[6..11]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let slice = &s[0..2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | let slice = &s[..2]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let slice = &s[3..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | let slice = &s[3..]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | let slice = &s[0..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/chapter4_ownership.rs:221:9 [INFO] [stdout] | [INFO] [stdout] 221 | let slice = &s[..]; // equal to one above [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter4_ownership.rs:231:9 [INFO] [stdout] | [INFO] [stdout] 231 | let s = "Hello, world!"; // String literal, immutable string [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:237:9 [INFO] [stdout] | [INFO] [stdout] 237 | let word = first_word_slice(&my_string[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | let word = first_word_slice(&my_string[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:241:9 [INFO] [stdout] | [INFO] [stdout] 241 | let word = first_word_slice(&my_string); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | let word = first_word_slice(&my_string_literal[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | let word = first_word_slice(&my_string_literal[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/chapter4_ownership.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | let word = first_word_slice(my_string_literal); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/chapter4_ownership.rs:254:9 [INFO] [stdout] | [INFO] [stdout] 254 | let a = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/chapter5_structs.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let user1 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/chapter5_structs.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/chapter5_structs.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/chapter5_structs.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let origin = Point(0, 0, 0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `subject` [INFO] [stdout] --> src/chapter5_structs.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let subject = AlwaysEqual; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subject` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let four = IpAddrKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let six = IpAddrKind::V6; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let home = IpAddr { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let loopback = IpAddr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let home = IpAddrEnum::V4(String::from("127.0.0.1")); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let loopback = IpAddrEnum::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let home = IpAddrEnum2::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let loopback = IpAddrEnum2::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_char` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let some_char = Some('e'); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_spaces` [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:114:20 [INFO] [stdout] | [INFO] [stdout] 114 | fn move_player(num_spaces: u8) {} [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_spaces` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:174:13 [INFO] [stdout] | [INFO] [stdout] 174 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 178 | count += 1; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter8_collections.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter8_collections.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `s` is assigned to, but never used [INFO] [stdout] --> src/chapter8_collections.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | let mut s = String::new(); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_s` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `s` is never read [INFO] [stdout] --> src/chapter8_collections.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | s = data.to_string(); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let s = String::from("initial contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/chapter8_collections.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let s3 = s1 + &s2; // note s1 has been moved here and can no longer be used [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter8_collections.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let s = 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: `s` [INFO] [stdout] --> src/chapter8_collections.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | 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/chapter8_collections.rs:108:9 [INFO] [stdout] | [INFO] [stdout] 108 | 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: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let greeting_file = match f { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let greeting_file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let greeting_file = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/chapter9_errors.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let greeting_file = File::open("hello.txt") [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_integer` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let both_integer = Point2 { x: 5, y: 4 }; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let both_float = Point2 { x: 5.0, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer_and_float` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let integer_and_float = Point2 { x: 5, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer_and_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:161:28 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn notifyWithTwoTraits(item: &(impl Summary + Display)) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expensive_closure` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let expensive_closure = |num: u32| -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expensive_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let s = example_closure(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: `c` [INFO] [stdout] --> src/chapter15_smart_pointers.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let c = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/chapter15_smart_pointers.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | let d = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_dangle` is never used [INFO] [stdout] --> src/chapter4_ownership.rs:177:4 [INFO] [stdout] | [INFO] [stdout] 177 | fn no_dangle() -> String { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active`, `username`, and `sign_in_count` are never read [INFO] [stdout] --> src/chapter5_structs.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 2 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 3 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 4 | email: String, [INFO] [stdout] 5 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/chapter5_structs.rs:20:14 [INFO] [stdout] | [INFO] [stdout] 20 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/chapter5_structs.rs:21:14 [INFO] [stdout] | [INFO] [stdout] 21 | struct Point(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user` is never used [INFO] [stdout] --> src/chapter5_structs.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user_with_shorthand` is never used [INFO] [stdout] --> src/chapter5_structs.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn build_user_with_shorthand(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area_w_tuples` is never used [INFO] [stdout] --> src/chapter5_structs.rs:126:4 [INFO] [stdout] | [INFO] [stdout] 126 | fn area_w_tuples(dimensions: (u32, u32)) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `can_hold` and `square` are never used [INFO] [stdout] --> src/chapter5_structs.rs:146:8 [INFO] [stdout] | [INFO] [stdout] 141 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 146 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 151 | fn square(size: u32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `kind` and `address` are never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | struct IpAddr { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 10 | kind: IpAddrKind, [INFO] [stdout] | ^^^^ [INFO] [stdout] 11 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | V4(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 26 | V4(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | V6(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 27 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, `2`, and `3` are never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | V4(u8, u8, u8, u8), [INFO] [stdout] | -- ^^ ^^ ^^ ^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 34 | V4((), (), (), ()), [INFO] [stdout] | ~~ ~~ ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:35:12 [INFO] [stdout] | [INFO] [stdout] 35 | V6(String), [INFO] [stdout] | -- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 35 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:45:11 [INFO] [stdout] | [INFO] [stdout] 45 | Write(String), [INFO] [stdout] | ----- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [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] 45 | Write(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 42 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 43 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 44 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 45 | Write(String), [INFO] [stdout] 46 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `QuitMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:59:12 [INFO] [stdout] | [INFO] [stdout] 59 | struct QuitMessage; // unit struct [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MoveMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:60:12 [INFO] [stdout] | [INFO] [stdout] 60 | struct MoveMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `WriteMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:64:12 [INFO] [stdout] | [INFO] [stdout] 64 | struct WriteMessage(String); // tuple struct [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ChangeColorMessage` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 65 | struct ChangeColorMessage(i32, i32, i32); // tuple struct [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ipv4Addr` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:77:8 [INFO] [stdout] | [INFO] [stdout] 77 | struct Ipv4Addr { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Ipv6Addr` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | struct Ipv6Addr { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `IpAddr` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:85:6 [INFO] [stdout] | [INFO] [stdout] 85 | enum IpAddr { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Coin` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:117:6 [INFO] [stdout] | [INFO] [stdout] 117 | enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `value_in_cents` is never used [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Alabama` is never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 137 | enum UsState { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 138 | 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] [INFO] [stdout] [INFO] [stdout] warning: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/chapter6_enums_pattern_match.rs:144:5 [INFO] [stdout] | [INFO] [stdout] 143 | enum UsCoin { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 144 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 145 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 146 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deliver_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn deliver_order() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_incorrect_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cook_order` is never used [INFO] [stdout] --> src/chapter7_packaging.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `seasonal_fruit` is never read [INFO] [stdout] --> src/chapter7_packaging.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct Breakfast { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 37 | pub toast: String, [INFO] [stdout] 38 | seasonal_fruit: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file` is never used [INFO] [stdout] --> src/chapter9_errors.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file2` is never used [INFO] [stdout] --> src/chapter9_errors.rs:80:4 [INFO] [stdout] | [INFO] [stdout] 80 | fn read_username_from_file2() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file3` is never used [INFO] [stdout] --> src/chapter9_errors.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | fn read_username_from_file3() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file4_shortest` is never used [INFO] [stdout] --> src/chapter9_errors.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn read_username_from_file4_shortest() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `last_char_of_first_line` is never used [INFO] [stdout] --> src/chapter9_errors.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn last_char_of_first_line(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_i32` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:24:4 [INFO] [stdout] | [INFO] [stdout] 24 | fn largest_i32(list: &[i32]) -> &i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_char` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn largest_char(list: &[char]) -> &char { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 54 | struct Point2 { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 55 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 56 | y: U, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 59 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 60 | x: T, [INFO] [stdout] 61 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `distance_from_origin` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 71 | impl Point { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 72 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Option` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:78:6 [INFO] [stdout] | [INFO] [stdout] 78 | enum Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:83:6 [INFO] [stdout] | [INFO] [stdout] 83 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_summarizable` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:181:4 [INFO] [stdout] | [INFO] [stdout] 181 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:192:8 [INFO] [stdout] | [INFO] [stdout] 192 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:198:8 [INFO] [stdout] | [INFO] [stdout] 197 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 198 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:204:8 [INFO] [stdout] | [INFO] [stdout] 203 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 204 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_one_v1` is never used [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | fn add_one_v1 (x: u32) -> u32 { x + 1 } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `height` is never read [INFO] [stdout] --> src/chapter13_closures_and_iterators.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 134 | struct Rectangle { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 135 | width: u32, [INFO] [stdout] 136 | 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: fields `0` and `1` are never read [INFO] [stdout] --> src/chapter15_smart_pointers.rs:237:10 [INFO] [stdout] | [INFO] [stdout] 237 | Cons(Rc>, Rc), [INFO] [stdout] | ---- ^^^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `List` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 237 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `RefCycleList` is never used [INFO] [stdout] --> src/chapter15_smart_pointers.rs:257:6 [INFO] [stdout] | [INFO] [stdout] 257 | enum RefCycleList { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `tail` is never used [INFO] [stdout] --> src/chapter15_smart_pointers.rs:263:8 [INFO] [stdout] | [INFO] [stdout] 262 | impl RefCycleList { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] 263 | fn tail(&self) -> Option<&RefCell>> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `value` and `children` are never read [INFO] [stdout] --> src/chapter15_smart_pointers.rs:274:5 [INFO] [stdout] | [INFO] [stdout] 273 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 274 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 275 | parent: RefCell>, [INFO] [stdout] 276 | children: RefCell>>, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` 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 `notifyOriginal` should have a snake case name [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:157:8 [INFO] [stdout] | [INFO] [stdout] 157 | pub fn notifyOriginal(item: &T) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `notify_original` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notifyWithTwoTraits` should have a snake case name [INFO] [stdout] --> src/chapter10_generics_traits_lifetimes.rs:161:8 [INFO] [stdout] | [INFO] [stdout] 161 | pub fn notifyWithTwoTraits(item: &(impl Summary + Display)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `notify_with_two_traits` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.99s [INFO] running `Command { std: "docker" "inspect" "e5b383b63b2ef5e5ad451d2482548fdc6614a02f2cedba5953941269e69f2103", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e5b383b63b2ef5e5ad451d2482548fdc6614a02f2cedba5953941269e69f2103", kill_on_drop: false }` [INFO] [stdout] e5b383b63b2ef5e5ad451d2482548fdc6614a02f2cedba5953941269e69f2103