[INFO] cloning repository https://github.com/harismuzaffer/rustsnippets [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/harismuzaffer/rustsnippets" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fharismuzaffer%2Frustsnippets", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fharismuzaffer%2Frustsnippets'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a7513a6f9afe48d5061edf7bba064de27292f18d [INFO] checking harismuzaffer/rustsnippets against try#3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f for pr-87248 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fharismuzaffer%2Frustsnippets" "/workspace/builds/worker-6/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/harismuzaffer/rustsnippets on toolchain 3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/harismuzaffer/rustsnippets [INFO] finished tweaking git repo https://github.com/harismuzaffer/rustsnippets [INFO] tweaked toml for git repo https://github.com/harismuzaffer/rustsnippets written to /workspace/builds/worker-6/source/Cargo.toml [INFO] crate git repo https://github.com/harismuzaffer/rustsnippets already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rand v0.5.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 481140af47b984902c05bef2f00eb8712523b5508a5840dd49d04914d2f703ab [INFO] running `Command { std: "docker" "start" "-a" "481140af47b984902c05bef2f00eb8712523b5508a5840dd49d04914d2f703ab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "481140af47b984902c05bef2f00eb8712523b5508a5840dd49d04914d2f703ab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "481140af47b984902c05bef2f00eb8712523b5508a5840dd49d04914d2f703ab", kill_on_drop: false }` [INFO] [stdout] 481140af47b984902c05bef2f00eb8712523b5508a5840dd49d04914d2f703ab [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 00018f4a31ff91507fd44f0c27d6dd6be44e13a3a9e83a5262b3f56485bb797d [INFO] running `Command { std: "docker" "start" "-a" "00018f4a31ff91507fd44f0c27d6dd6be44e13a3a9e83a5262b3f56485bb797d", kill_on_drop: false }` [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking rand v0.5.6 [INFO] [stderr] Checking learningrust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/expressions.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | let a = (78 - 10); [INFO] [stdout] | ^^^^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/expressions.rs:10:17 [INFO] [stdout] | [INFO] [stdout] 10 | let a = (56 * 2); // a statemnt [INFO] [stdout] | ^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/expressions.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | let a = (78 - 10); [INFO] [stdout] | ^^^^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around assigned value [INFO] [stdout] --> src/expressions.rs:10:17 [INFO] [stdout] | [INFO] [stdout] 10 | let a = (56 * 2); // a statemnt [INFO] [stdout] | ^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/strings.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let b = a; // this doesnt move ownership from a to b becoz a is a string literal [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `another_slice_string` [INFO] [stdout] --> src/strings.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let another_slice_string = &normal_string[0..5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_another_slice_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/datatypes.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let (x, y, z, o) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/datatypes.rs:21:20 [INFO] [stdout] | [INFO] [stdout] 21 | let (x, y, z, o) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `o` [INFO] [stdout] --> src/datatypes.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 21 | let (x, y, z, o) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_o` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `x` is never read [INFO] [stdout] --> src/enums.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | x = get_location(myipadd); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/vectors.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut v: Vec = Vec::new(); // an empty vector [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/vectors.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | 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/safety_rules.rs:23:14 [INFO] [stdout] | [INFO] [stdout] 23 | fn ownit(s: String){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kk` [INFO] [stdout] --> src/safety_rules.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | let kk = &k; // ok [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_kk` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kkk` [INFO] [stdout] --> src/safety_rules.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let kkk = &mut k; // NOT OK(as long as `kk` is active i.e. if we attempt to use `kk` later) [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_kkk` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ll` [INFO] [stdout] --> src/safety_rules.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let ll = &mut l; // ok [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ll` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lll` [INFO] [stdout] --> src/safety_rules.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | let lll = &mut l; // NOT OK(as long as `ll` is active) because two immutable references, next line is an error [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_lll` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `m` [INFO] [stdout] --> src/safety_rules.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | let mut m = String::from("hello world"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item_100th` [INFO] [stdout] --> src/error_handling.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let item_100th = &v[99]; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_item_100th` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/error_handling.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `abc` [INFO] [stdout] --> src/error_handling.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | abc => panic!("problem opening the file") [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_abc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/error_handling.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ff` [INFO] [stdout] --> src/error_handling.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | let ff = File::open("somefile.csv").expect("file could not be opened"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fff` [INFO] [stdout] --> src/error_handling.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let fff = File::open("somefile.csv").unwrap(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `r` is assigned to, but never used [INFO] [stdout] --> src/lifetimes.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | 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/lifetimes.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | r = &s; [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/lifetimes.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | 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: `y` [INFO] [stdout] --> src/closures_iterators.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | let y = String::from("world"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v3` [INFO] [stdout] --> src/closures_iterators.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | let v3: Vec<&mut String> = v2.map(|x| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/expressions.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let a = (78 - 10); [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/expressions.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let a = (56 * 2); // a statemnt [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/expressions.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | let x = some_fn(); // x holds 10 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/stack_vs_heap.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let b = a; // since `a` implements Copy trait, the data that `a` is holding(on the Stack) is [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ss` [INFO] [stdout] --> src/stack_vs_heap.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let ss = s; // since `s` DOES NOT implement Copy trait, `ss` gets a copy of `s` but only the [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ss` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/vectors.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let mut v: Vec = Vec::new(); // an empty vector [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/safety_rules.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let mut m = String::from("hello world"); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `part` [INFO] [stdout] --> src/lifetimes.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | part: &'a str, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `calculation` [INFO] [stdout] --> src/closures_iterators.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | calculation: T, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `value` [INFO] [stdout] --> src/closures_iterators.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | value: Option [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `value` [INFO] [stdout] --> src/closures_iterators.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | fn value(&mut self, arg: u32) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused arithmetic operation that must be used [INFO] [stdout] --> src/expressions.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | 56 * 2; // Adding a semicolon turns an expresion into a statement [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 39 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/strings.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let b = a; // this doesnt move ownership from a to b becoz a is a string literal [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `another_slice_string` [INFO] [stdout] --> src/strings.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let another_slice_string = &normal_string[0..5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_another_slice_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/datatypes.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | let (x, y, z, o) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/datatypes.rs:21:20 [INFO] [stdout] | [INFO] [stdout] 21 | let (x, y, z, o) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `o` [INFO] [stdout] --> src/datatypes.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 21 | let (x, y, z, o) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_o` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `x` is never read [INFO] [stdout] --> src/enums.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | x = get_location(myipadd); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/vectors.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut v: Vec = Vec::new(); // an empty vector [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/vectors.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | 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/safety_rules.rs:23:14 [INFO] [stdout] | [INFO] [stdout] 23 | fn ownit(s: String){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kk` [INFO] [stdout] --> src/safety_rules.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | let kk = &k; // ok [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_kk` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `kkk` [INFO] [stdout] --> src/safety_rules.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | let kkk = &mut k; // NOT OK(as long as `kk` is active i.e. if we attempt to use `kk` later) [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_kkk` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ll` [INFO] [stdout] --> src/safety_rules.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let ll = &mut l; // ok [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ll` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lll` [INFO] [stdout] --> src/safety_rules.rs:51:13 [INFO] [stdout] | [INFO] [stdout] 51 | let lll = &mut l; // NOT OK(as long as `ll` is active) because two immutable references, next line is an error [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_lll` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `m` [INFO] [stdout] --> src/safety_rules.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | let mut m = String::from("hello world"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item_100th` [INFO] [stdout] --> src/error_handling.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let item_100th = &v[99]; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_item_100th` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/error_handling.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `abc` [INFO] [stdout] --> src/error_handling.rs:35:17 [INFO] [stdout] | [INFO] [stdout] 35 | abc => panic!("problem opening the file") [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_abc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/error_handling.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ff` [INFO] [stdout] --> src/error_handling.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | let ff = File::open("somefile.csv").expect("file could not be opened"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fff` [INFO] [stdout] --> src/error_handling.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let fff = File::open("somefile.csv").unwrap(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_fff` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `r` is assigned to, but never used [INFO] [stdout] --> src/lifetimes.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | 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/lifetimes.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | r = &s; [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/lifetimes.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | 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: `y` [INFO] [stdout] --> src/closures_iterators.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | let y = String::from("world"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v3` [INFO] [stdout] --> src/closures_iterators.rs:70:17 [INFO] [stdout] | [INFO] [stdout] 70 | let v3: Vec<&mut String> = v2.map(|x| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/expressions.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let a = (78 - 10); [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/expressions.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let a = (56 * 2); // a statemnt [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/expressions.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | let x = some_fn(); // x holds 10 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/stack_vs_heap.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let b = a; // since `a` implements Copy trait, the data that `a` is holding(on the Stack) is [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ss` [INFO] [stdout] --> src/stack_vs_heap.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let ss = s; // since `s` DOES NOT implement Copy trait, `ss` gets a copy of `s` but only the [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ss` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/vectors.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let mut v: Vec = Vec::new(); // an empty vector [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/safety_rules.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | let mut m = String::from("hello world"); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `part` [INFO] [stdout] --> src/lifetimes.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | part: &'a str, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `calculation` [INFO] [stdout] --> src/closures_iterators.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | calculation: T, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `value` [INFO] [stdout] --> src/closures_iterators.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | value: Option [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `value` [INFO] [stdout] --> src/closures_iterators.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | fn value(&mut self, arg: u32) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused arithmetic operation that must be used [INFO] [stdout] --> src/expressions.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | 56 * 2; // Adding a semicolon turns an expresion into a statement [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 39 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.16s [INFO] running `Command { std: "docker" "inspect" "00018f4a31ff91507fd44f0c27d6dd6be44e13a3a9e83a5262b3f56485bb797d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "00018f4a31ff91507fd44f0c27d6dd6be44e13a3a9e83a5262b3f56485bb797d", kill_on_drop: false }` [INFO] [stdout] 00018f4a31ff91507fd44f0c27d6dd6be44e13a3a9e83a5262b3f56485bb797d