[INFO] cloning repository https://github.com/yeomiji/rust-notes [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/yeomiji/rust-notes" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyeomiji%2Frust-notes", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyeomiji%2Frust-notes'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8ed8596b548002c035f91cf0d31c9e5084e986c9 [INFO] building yeomiji/rust-notes 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%2Fyeomiji%2Frust-notes" "/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/yeomiji/rust-notes 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/yeomiji/rust-notes [INFO] finished tweaking git repo https://github.com/yeomiji/rust-notes [INFO] tweaked toml for git repo https://github.com/yeomiji/rust-notes written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/yeomiji/rust-notes 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] e03c57a222f9230ad50b44390a5c1b4685cb376b3ac28679a47b0e30806f3a0b [INFO] running `Command { std: "docker" "start" "-a" "e03c57a222f9230ad50b44390a5c1b4685cb376b3ac28679a47b0e30806f3a0b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e03c57a222f9230ad50b44390a5c1b4685cb376b3ac28679a47b0e30806f3a0b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e03c57a222f9230ad50b44390a5c1b4685cb376b3ac28679a47b0e30806f3a0b", kill_on_drop: false }` [INFO] [stdout] e03c57a222f9230ad50b44390a5c1b4685cb376b3ac28679a47b0e30806f3a0b [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] 91718760a391e3e90d6b3d582e244e30f731f9555b4d4fd8f86f941e620e6669 [INFO] running `Command { std: "docker" "start" "-a" "91718760a391e3e90d6b3d582e244e30f731f9555b4d4fd8f86f941e620e6669", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling getrandom v0.2.6 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling rust-notes v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch4/main.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let s = "hello"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch4/main.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let s = "hello"; [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/ch4/main.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | let s = String::from("hello"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/ch4/main.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let s2 = s1; // ownership is transferred, so can't use s1 now [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/ch4/main.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | 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: `hello` [INFO] [stdout] --> src/ch4/main.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | 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/ch4/main.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | 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/ch4/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | 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/ch4/main.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let slice = &s[..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/ch4/main.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | 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/ch4/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | let slice = &s[3..]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/ch4/main.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let hello = first_word(&s); // deref coercion [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Option_i32` should have an upper camel case name [INFO] [stdout] --> src/ch10/main.rs:323:6 [INFO] [stdout] | [INFO] [stdout] 323 | enum Option_i32 { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `OptionI32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Option_f64` should have an upper camel case name [INFO] [stdout] --> src/ch10/main.rs:328:6 [INFO] [stdout] | [INFO] [stdout] 328 | enum Option_f64 { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `OptionF64` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::Map` [INFO] [stdout] --> src/ch13/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::iter::Map; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ErrorKind` and `Read` [INFO] [stdout] --> src/ch9/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::{ErrorKind, Read}; [INFO] [stdout] | ^^^^^^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/ch10/main.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer_and_float` [INFO] [stdout] --> src/ch10/main.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | 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: `integer` [INFO] [stdout] --> src/ch10/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let integer = Some(5); [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/ch10/main.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let float = Some(5.0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/ch10/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let integer = Option_i32::Some(5); [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/ch10/main.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let float = Option_f64::Some(5.0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch10/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let s = 3.to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `r` is assigned to, but never used [INFO] [stdout] --> src/ch10/main.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let r; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_r` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `r` is never read [INFO] [stdout] --> src/ch10/main.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | r = &x; [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: variable `result` is assigned to, but never used [INFO] [stdout] --> src/ch10/main.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | let result; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_result` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/ch10/main.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | result = longest(string1.as_str(), string2.as_str()); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/ch10/main.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | let i = ImportantExcerpt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch10/main.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | let s: &'static str = "I have a static lifetime."; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/ch10/main.rs:178:29 [INFO] [stdout] | [INFO] [stdout] 178 | fn longest2<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item1` [INFO] [stdout] --> src/ch10/main.rs:270:16 [INFO] [stdout] | [INFO] [stdout] 270 | pub fn notify3(item1: &impl Summary, item2: &impl Summary) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item2` [INFO] [stdout] --> src/ch10/main.rs:270:38 [INFO] [stdout] | [INFO] [stdout] 270 | pub fn notify3(item1: &impl Summary, item2: &impl Summary) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item1` [INFO] [stdout] --> src/ch10/main.rs:274:28 [INFO] [stdout] | [INFO] [stdout] 274 | pub fn notify4(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item2` [INFO] [stdout] --> src/ch10/main.rs:274:39 [INFO] [stdout] | [INFO] [stdout] 274 | pub fn notify4(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/ch10/main.rs:278:16 [INFO] [stdout] | [INFO] [stdout] 278 | pub fn notify5(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: `item` [INFO] [stdout] --> src/ch10/main.rs:279:38 [INFO] [stdout] | [INFO] [stdout] 279 | pub fn notify6(item: &T) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/ch10/main.rs:281:54 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn notify7(t: &T, u: &U) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/ch10/main.rs:281:61 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn notify7(t: &T, u: &U) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/ch10/main.rs:282:22 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn notify8(t: &T, u: &U) where T: Display + Clone, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/ch10/main.rs:282:29 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn notify8(t: &T, u: &U) where T: Display + Clone, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/ch9/main.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let f = File::open("hello.txt")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest_with_an_announcement` is never used [INFO] [stdout] --> src/ch10/main.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn longest_with_an_announcement<'a, T>( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> src/ch10/main.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn first_word(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `announce_and_return_part` is never used [INFO] [stdout] --> src/ch10/main.rs:156:8 [INFO] [stdout] | [INFO] [stdout] 154 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] 155 | // rule 1,3 applied [INFO] [stdout] 156 | fn announce_and_return_part(&self, announcement: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `part` is never read [INFO] [stdout] --> src/ch10/main.rs:164:5 [INFO] [stdout] | [INFO] [stdout] 163 | struct ImportantExcerpt<'a> { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 164 | part: &'a str, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch10/main.rs:208:8 [INFO] [stdout] | [INFO] [stdout] 207 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 208 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_summarizable` is never used [INFO] [stdout] --> src/ch10/main.rs:223:4 [INFO] [stdout] | [INFO] [stdout] 223 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch10/main.rs:324:10 [INFO] [stdout] | [INFO] [stdout] 324 | Some(i32), [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] 324 | Some(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `None` is never constructed [INFO] [stdout] --> src/ch10/main.rs:325:5 [INFO] [stdout] | [INFO] [stdout] 323 | enum Option_i32 { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] 324 | Some(i32), [INFO] [stdout] 325 | None, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch10/main.rs:329:10 [INFO] [stdout] | [INFO] [stdout] 329 | Some(f64), [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] 329 | Some(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `None` is never constructed [INFO] [stdout] --> src/ch10/main.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 328 | enum Option_f64 { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] 329 | Some(f64), [INFO] [stdout] 330 | None, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AddAssign` and `Add` [INFO] [stdout] --> src/ch8/main.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | use std::ops::{Add, AddAssign}; [INFO] [stdout] | ^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/ch10/main.rs:339:8 [INFO] [stdout] | [INFO] [stdout] 338 | impl Point { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 339 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/ch10/main.rs:351:5 [INFO] [stdout] | [INFO] [stdout] 350 | struct Point2 { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 351 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 352 | y: U, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/ch10/main.rs:372:6 [INFO] [stdout] | [INFO] [stdout] 372 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `last_char_of_first_line` is never used [INFO] [stdout] --> src/ch9/main.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn last_char_of_first_line(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file` is never used [INFO] [stdout] --> src/ch9/main.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/ch6/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | _ => reroll(), // if we don't want to use the value [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/ch6/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 49 | 3 => add_fancy_hat(), [INFO] [stdout] | - matches some of the same values [INFO] [stdout] 50 | 7 => remove_fancy_hat(), [INFO] [stdout] | - matches some of the same values [INFO] [stdout] 51 | other => move_player(other), // catch all [INFO] [stdout] | ----- matches some of the same values [INFO] [stdout] 52 | _ => reroll(), // if we don't want to use the value [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/ch6/main.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let home = IpAddr::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/ch6/main.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let loopback = IpAddr::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/ch6/main.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | 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_string` [INFO] [stdout] --> src/ch6/main.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let some_string = Some("a string"); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/ch6/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let absent_number: Option = None; // explicit type since the compiler can't tell [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count` [INFO] [stdout] --> src/ch6/main.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | let mut count = 0; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch13/main.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let s = example_closure(String::from("hello")); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch6/main.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let mut count = 0; [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: `num_spaces` [INFO] [stdout] --> src/ch6/main.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | 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: struct `Counter` is never constructed [INFO] [stdout] --> src/ch13/main.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | struct Counter { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch13/main.rs:64:8 [INFO] [stdout] | [INFO] [stdout] 63 | impl Counter { [INFO] [stdout] | ------------ associated function in this implementation [INFO] [stdout] 64 | fn new() -> Counter { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulated_expensive_calculation` is never used [INFO] [stdout] --> src/ch13/main.rs:189:4 [INFO] [stdout] | [INFO] [stdout] 189 | fn simulated_expensive_calculation(intensity: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Shoe` is never constructed [INFO] [stdout] --> src/ch13/main.rs:196:8 [INFO] [stdout] | [INFO] [stdout] 196 | struct Shoe { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shoes_in_size` is never used [INFO] [stdout] --> src/ch13/main.rs:201:4 [INFO] [stdout] | [INFO] [stdout] 201 | fn shoes_in_size(shoes: Vec, shoe_size: u32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `spaces` [INFO] [stdout] --> src/ch3/main.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let spaces = spaces.len(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_spaces` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/ch3/main.rs:17:10 [INFO] [stdout] | [INFO] [stdout] 17 | 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/ch3/main.rs:17:16 [INFO] [stdout] | [INFO] [stdout] 17 | 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/ch3/main.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let five_hundred = tup.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/ch3/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let six_point_four = tup.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: `user1` [INFO] [stdout] --> src/ch5/main.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let user1 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/ch5/main.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | 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/ch5/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | 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/ch5/main.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | 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: `one` [INFO] [stdout] --> src/ch3/main.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let one = tup.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/ch3/main.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | 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: `a` [INFO] [stdout] --> src/ch3/main.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | 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/ch3/main.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | 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/ch3/main.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | 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/ch3/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | 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: `v` [INFO] [stdout] --> src/ch8/main.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/ch8/main.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let first = &v[0]; // immutable reference [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/ch8/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch8/main.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let mut s = String::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_kind` [INFO] [stdout] --> src/ch6/main.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | fn route(ip_kind: IpAddr) {} [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_kind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch8/main.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | 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: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/ch6/main.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 93 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 94 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 95 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 96 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch8/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | 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: field `0` is never read [INFO] [stdout] --> src/ch6/main.rs:103:11 [INFO] [stdout] | [INFO] [stdout] 103 | 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] 103 | Write(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/ch6/main.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 100 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 101 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 102 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 103 | Write(String), [INFO] [stdout] 104 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/ch8/main.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let s3 = s1 + &s2; [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/ch8/main.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | 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: fields `0`, `1`, `2`, and `3` are never read [INFO] [stdout] --> src/ch6/main.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | 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] 108 | V4((), (), (), ()), [INFO] [stdout] | ~~ ~~ ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/ch8/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let s1 = String::from("hello"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/ch5/main.rs:113:14 [INFO] [stdout] | [INFO] [stdout] 113 | 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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/ch5/main.rs:114:14 [INFO] [stdout] | [INFO] [stdout] 114 | 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/ch5/main.rs:117:4 [INFO] [stdout] | [INFO] [stdout] 117 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active` and `sign_in_count` are never read [INFO] [stdout] --> src/ch5/main.rs:135:5 [INFO] [stdout] | [INFO] [stdout] 134 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 135 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `THREE_HOURS_IN_SECONDS` is never used [INFO] [stdout] --> src/ch3/main.rs:1:7 [INFO] [stdout] | [INFO] [stdout] 1 | const THREE_HOURS_IN_SECONDS: u32 = 60 * 60 * 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch6/main.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | 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] 109 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ch6/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 1 | fn main() { [INFO] [stdout] | --------- move the `impl` block outside of this function `main` [INFO] [stdout] ... [INFO] [stdout] 10 | impl Message { [INFO] [stdout] | ^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | `Message` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch8/main.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let mut s = String::new(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch8/main.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | let mut scores: HashMap<_, _> = [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch8/main.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | let mut res = scores.entry(String::from("Green")).or_insert(0); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch8/main.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | Int(i32), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 43 | Int(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch8/main.rs:44:15 [INFO] [stdout] | [INFO] [stdout] 44 | Float(f64), [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] 44 | Float(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch8/main.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | Text(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 | Text(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.51s [INFO] running `Command { std: "docker" "inspect" "91718760a391e3e90d6b3d582e244e30f731f9555b4d4fd8f86f941e620e6669", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "91718760a391e3e90d6b3d582e244e30f731f9555b4d4fd8f86f941e620e6669", kill_on_drop: false }` [INFO] [stdout] 91718760a391e3e90d6b3d582e244e30f731f9555b4d4fd8f86f941e620e6669 [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] 9e0dafc1718e5eba3cd46936b3d071017ee350c519cec2456040af1d507f8d2d [INFO] running `Command { std: "docker" "start" "-a" "9e0dafc1718e5eba3cd46936b3d071017ee350c519cec2456040af1d507f8d2d", kill_on_drop: false }` [INFO] [stderr] Compiling rust-notes v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `spaces` [INFO] [stdout] --> src/ch3/main.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let spaces = spaces.len(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_spaces` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `AddAssign` and `Add` [INFO] [stdout] --> src/ch8/main.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | use std::ops::{Add, AddAssign}; [INFO] [stdout] | ^^^ ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/ch3/main.rs:17:10 [INFO] [stdout] | [INFO] [stdout] 17 | 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/ch3/main.rs:17:16 [INFO] [stdout] | [INFO] [stdout] 17 | 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/ch3/main.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let five_hundred = tup.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/ch3/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let six_point_four = tup.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/ch3/main.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let one = tup.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/ch3/main.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | 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: `a` [INFO] [stdout] --> src/ch3/main.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | 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/ch3/main.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | 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/ch3/main.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | 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/ch3/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let second = a[1]; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_second` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `THREE_HOURS_IN_SECONDS` is never used [INFO] [stdout] --> src/ch3/main.rs:1:7 [INFO] [stdout] | [INFO] [stdout] 1 | const THREE_HOURS_IN_SECONDS: u32 = 60 * 60 * 3; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter::Map` [INFO] [stdout] --> src/ch13/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::iter::Map; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Option_i32` should have an upper camel case name [INFO] [stdout] --> src/ch10/main.rs:323:6 [INFO] [stdout] | [INFO] [stdout] 323 | enum Option_i32 { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `OptionI32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `Option_f64` should have an upper camel case name [INFO] [stdout] --> src/ch10/main.rs:328:6 [INFO] [stdout] | [INFO] [stdout] 328 | enum Option_f64 { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `OptionF64` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/ch10/main.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer_and_float` [INFO] [stdout] --> src/ch10/main.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | 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: `integer` [INFO] [stdout] --> src/ch10/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let integer = Some(5); [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/ch10/main.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let float = Some(5.0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/ch10/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let integer = Option_i32::Some(5); [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/ch10/main.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let float = Option_f64::Some(5.0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch10/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let s = 3.to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `r` is assigned to, but never used [INFO] [stdout] --> src/ch10/main.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let r; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_r` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `r` is never read [INFO] [stdout] --> src/ch10/main.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 68 | r = &x; [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: variable `result` is assigned to, but never used [INFO] [stdout] --> src/ch10/main.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | let result; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_result` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `result` is never read [INFO] [stdout] --> src/ch10/main.rs:101:9 [INFO] [stdout] | [INFO] [stdout] 101 | result = longest(string1.as_str(), string2.as_str()); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/ch10/main.rs:115:9 [INFO] [stdout] | [INFO] [stdout] 115 | let i = ImportantExcerpt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch10/main.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | let s: &'static str = "I have a static lifetime."; [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/ch4/main.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let s = "hello"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch4/main.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let s = "hello"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/ch10/main.rs:178:29 [INFO] [stdout] | [INFO] [stdout] 178 | fn longest2<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch4/main.rs:11:13 [INFO] [stdout] | [INFO] [stdout] 11 | let s = String::from("hello"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/ch4/main.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let s2 = s1; // ownership is transferred, so can't use s1 now [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/ch4/main.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | 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: `hello` [INFO] [stdout] --> src/ch4/main.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | 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/ch4/main.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | 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/ch4/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | 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/ch4/main.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let slice = &s[..2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/ch5/main.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let user1 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/ch4/main.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | 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/ch4/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | let slice = &s[3..]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/ch4/main.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let hello = first_word(&s); // deref coercion [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item1` [INFO] [stdout] --> src/ch10/main.rs:270:16 [INFO] [stdout] | [INFO] [stdout] 270 | pub fn notify3(item1: &impl Summary, item2: &impl Summary) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item2` [INFO] [stdout] --> src/ch10/main.rs:270:38 [INFO] [stdout] | [INFO] [stdout] 270 | pub fn notify3(item1: &impl Summary, item2: &impl Summary) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item1` [INFO] [stdout] --> src/ch10/main.rs:274:28 [INFO] [stdout] | [INFO] [stdout] 274 | pub fn notify4(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item2` [INFO] [stdout] --> src/ch10/main.rs:274:39 [INFO] [stdout] | [INFO] [stdout] 274 | pub fn notify4(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/ch10/main.rs:278:16 [INFO] [stdout] | [INFO] [stdout] 278 | pub fn notify5(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: `item` [INFO] [stdout] --> src/ch10/main.rs:279:38 [INFO] [stdout] | [INFO] [stdout] 279 | pub fn notify6(item: &T) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/ch10/main.rs:281:54 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn notify7(t: &T, u: &U) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/ch10/main.rs:281:61 [INFO] [stdout] | [INFO] [stdout] 281 | pub fn notify7(t: &T, u: &U) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/ch10/main.rs:282:22 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn notify8(t: &T, u: &U) where T: Display + Clone, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/ch10/main.rs:282:29 [INFO] [stdout] | [INFO] [stdout] 282 | pub fn notify8(t: &T, u: &U) where T: Display + Clone, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest_with_an_announcement` is never used [INFO] [stdout] --> src/ch10/main.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn longest_with_an_announcement<'a, T>( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> src/ch10/main.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn first_word(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `announce_and_return_part` is never used [INFO] [stdout] --> src/ch10/main.rs:156:8 [INFO] [stdout] | [INFO] [stdout] 154 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] 155 | // rule 1,3 applied [INFO] [stdout] 156 | fn announce_and_return_part(&self, announcement: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `part` is never read [INFO] [stdout] --> src/ch10/main.rs:164:5 [INFO] [stdout] | [INFO] [stdout] 163 | struct ImportantExcerpt<'a> { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 164 | part: &'a str, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch10/main.rs:208:8 [INFO] [stdout] | [INFO] [stdout] 207 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 208 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_summarizable` is never used [INFO] [stdout] --> src/ch10/main.rs:223:4 [INFO] [stdout] | [INFO] [stdout] 223 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch10/main.rs:324:10 [INFO] [stdout] | [INFO] [stdout] 324 | Some(i32), [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] 324 | Some(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `None` is never constructed [INFO] [stdout] --> src/ch10/main.rs:325:5 [INFO] [stdout] | [INFO] [stdout] 323 | enum Option_i32 { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] 324 | Some(i32), [INFO] [stdout] 325 | None, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch10/main.rs:329:10 [INFO] [stdout] | [INFO] [stdout] 329 | Some(f64), [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] 329 | Some(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `None` is never constructed [INFO] [stdout] --> src/ch10/main.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 328 | enum Option_f64 { [INFO] [stdout] | ---------- variant in this enum [INFO] [stdout] 329 | Some(f64), [INFO] [stdout] 330 | None, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/ch10/main.rs:339:8 [INFO] [stdout] | [INFO] [stdout] 338 | impl Point { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 339 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/ch10/main.rs:351:5 [INFO] [stdout] | [INFO] [stdout] 350 | struct Point2 { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 351 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 352 | y: U, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/ch10/main.rs:372:6 [INFO] [stdout] | [INFO] [stdout] 372 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/ch6/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | _ => reroll(), // if we don't want to use the value [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/ch6/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 49 | 3 => add_fancy_hat(), [INFO] [stdout] | - matches some of the same values [INFO] [stdout] 50 | 7 => remove_fancy_hat(), [INFO] [stdout] | - matches some of the same values [INFO] [stdout] 51 | other => move_player(other), // catch all [INFO] [stdout] | ----- matches some of the same values [INFO] [stdout] 52 | _ => reroll(), // if we don't want to use the value [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/ch5/main.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | 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/ch5/main.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | 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/ch5/main.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | 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: `home` [INFO] [stdout] --> src/ch6/main.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let home = IpAddr::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/ch6/main.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let loopback = IpAddr::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/ch6/main.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | 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_string` [INFO] [stdout] --> src/ch6/main.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let some_string = Some("a string"); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/ch6/main.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let absent_number: Option = None; // explicit type since the compiler can't tell [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `count` [INFO] [stdout] --> src/ch6/main.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | let mut count = 0; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_count` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch6/main.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let mut count = 0; [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: `num_spaces` [INFO] [stdout] --> src/ch6/main.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | 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: unused variable: `ip_kind` [INFO] [stdout] --> src/ch6/main.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | fn route(ip_kind: IpAddr) {} [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_kind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/ch5/main.rs:113:14 [INFO] [stdout] | [INFO] [stdout] 113 | 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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/ch5/main.rs:114:14 [INFO] [stdout] | [INFO] [stdout] 114 | 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/ch5/main.rs:117:4 [INFO] [stdout] | [INFO] [stdout] 117 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `active` and `sign_in_count` are never read [INFO] [stdout] --> src/ch5/main.rs:135:5 [INFO] [stdout] | [INFO] [stdout] 134 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 135 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 138 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/ch6/main.rs:94:5 [INFO] [stdout] | [INFO] [stdout] 93 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 94 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 95 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 96 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch6/main.rs:103:11 [INFO] [stdout] | [INFO] [stdout] 103 | 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] 103 | Write(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/ch6/main.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 100 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 101 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 102 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 103 | Write(String), [INFO] [stdout] 104 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, `2`, and `3` are never read [INFO] [stdout] --> src/ch6/main.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | 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] 108 | V4((), (), (), ()), [INFO] [stdout] | ~~ ~~ ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/ch6/main.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | 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] 109 | V6(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/ch6/main.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 1 | fn main() { [INFO] [stdout] | --------- move the `impl` block outside of this function `main` [INFO] [stdout] ... [INFO] [stdout] 10 | impl Message { [INFO] [stdout] | ^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | `Message` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ErrorKind` and `Read` [INFO] [stdout] --> src/ch9/main.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | use std::io::{ErrorKind, Read}; [INFO] [stdout] | ^^^^^^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/ch9/main.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let f = File::open("hello.txt")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `last_char_of_first_line` is never used [INFO] [stdout] --> src/ch9/main.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn last_char_of_first_line(text: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file` is never used [INFO] [stdout] --> src/ch9/main.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/ch8/main.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/ch8/main.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let first = &v[0]; // immutable reference [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/ch8/main.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch8/main.rs:53:13 [INFO] [stdout] | [INFO] [stdout] 53 | let mut s = String::new(); [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/ch8/main.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | 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/ch8/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | 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/ch8/main.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let s3 = s1 + &s2; [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/ch8/main.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | 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: `s1` [INFO] [stdout] --> src/ch8/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | let s1 = String::from("hello"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch13/main.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let s = example_closure(String::from("hello")); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch8/main.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let mut s = String::new(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch8/main.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | let mut scores: HashMap<_, _> = [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch8/main.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | let mut res = scores.entry(String::from("Green")).or_insert(0); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v1` [INFO] [stdout] --> src/ch13/main.rs:138:13 [INFO] [stdout] | [INFO] [stdout] 138 | let v1 = c.value(1); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulated_expensive_calculation` is never used [INFO] [stdout] --> src/ch13/main.rs:189:4 [INFO] [stdout] | [INFO] [stdout] 189 | fn simulated_expensive_calculation(intensity: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 1.21s [INFO] running `Command { std: "docker" "inspect" "9e0dafc1718e5eba3cd46936b3d071017ee350c519cec2456040af1d507f8d2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9e0dafc1718e5eba3cd46936b3d071017ee350c519cec2456040af1d507f8d2d", kill_on_drop: false }` [INFO] [stdout] 9e0dafc1718e5eba3cd46936b3d071017ee350c519cec2456040af1d507f8d2d