[INFO] cloning repository https://github.com/wildfauve/hello-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wildfauve/hello-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwildfauve%2Fhello-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwildfauve%2Fhello-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8b99ae38276a8099b806e0cb7e7ff4c624830d34 [INFO] checking wildfauve/hello-rust against try#5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db for pr-143717 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwildfauve%2Fhello-rust" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] error: copy-fd: write returned: No space left on device [INFO] [stderr] fatal: cannot copy '/usr/share/git-core/templates/hooks/pre-merge-commit.sample' to '/workspace/builds/worker-2-tc2/source/.git/hooks/pre-merge-commit.sample': No space left on device [INFO] checking wildfauve/hello-rust against try#5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db for pr-143717 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwildfauve%2Fhello-rust" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/wildfauve/hello-rust [INFO] finished tweaking git repo https://github.com/wildfauve/hello-rust [INFO] tweaked toml for git repo https://github.com/wildfauve/hello-rust written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/wildfauve/hello-rust on toolchain 5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/wildfauve/hello-rust 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" "+5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 523a3bfb21061e5a4045ddb4080199a986c7ed35daf5705f7cae1bdcca711cec [INFO] running `Command { std: "docker" "start" "-a" "523a3bfb21061e5a4045ddb4080199a986c7ed35daf5705f7cae1bdcca711cec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "523a3bfb21061e5a4045ddb4080199a986c7ed35daf5705f7cae1bdcca711cec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "523a3bfb21061e5a4045ddb4080199a986c7ed35daf5705f7cae1bdcca711cec", kill_on_drop: false }` [INFO] [stdout] 523a3bfb21061e5a4045ddb4080199a986c7ed35daf5705f7cae1bdcca711cec [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+5ef65a4ed75279dc1b7a26cedc27293a9f4ca8db" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7ef0bd2d9ce8ed17a354586656ed6953bb61795a449571f7aa254708c52dabc4 [INFO] running `Command { std: "docker" "start" "-a" "7ef0bd2d9ce8ed17a354586656ed6953bb61795a449571f7aa254708c52dabc4", kill_on_drop: false }` [INFO] [stderr] Checking hello-world v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `var_combined` [INFO] [stdout] --> src/cast_shadow_const_static.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let var_combined = var_f32 as i32 + var_i32; // but this will lose data. [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_var_combined` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var_combined` [INFO] [stdout] --> src/cast_shadow_const_static.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let var_combined = var_f32 as i32 + var_i32; // but this will lose data. [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_var_combined` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `long_running_closure` [INFO] [stdout] --> src/closures.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let long_running_closure = |num: u32| -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_long_running_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/closures.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v3` [INFO] [stdout] --> src/closures.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let add_one_v3 = |x: u32| x + 1; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v1` [INFO] [stdout] --> src/collections.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let v1: Vec = Vec::new(); // Create an empty vector. Note we give it a type annotation [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/collections.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let first = &v3[0]; // immut borrow occurs here [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `long_running_closure` [INFO] [stdout] --> src/closures.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let long_running_closure = |num: u32| -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_long_running_closure` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/closures.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v3` [INFO] [stdout] --> src/closures.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let add_one_v3 = |x: u32| x + 1; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_add_one_v3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `blu_score_again` [INFO] [stdout] --> src/collections.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let blu_score_again = scores.get(&blu).copied().unwrap_or(0); // we call copied so that the result returned is an i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_blu_score_again` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `current_blu_score` [INFO] [stdout] --> src/collections.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | let current_blu_score = scores.entry(&blu).or_insert(100); // entry returns an Entry Enum. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current_blu_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v1` [INFO] [stdout] --> src/collections.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let v1: Vec = Vec::new(); // Create an empty vector. Note we give it a type annotation [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/collections.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let first = &v3[0]; // immut borrow occurs here [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `blu_score_again` [INFO] [stdout] --> src/collections.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let blu_score_again = scores.get(&blu).copied().unwrap_or(0); // we call copied so that the result returned is an i32 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_blu_score_again` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `current_blu_score` [INFO] [stdout] --> src/collections.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | let current_blu_score = scores.entry(&blu).or_insert(100); // entry returns an Entry Enum. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_current_blu_score` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `option1` [INFO] [stdout] --> src/generics.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let option1 = GenericEnum::Option1("a str"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_option1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `generic_fn_result_1` [INFO] [stdout] --> src/generics.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let generic_fn_result_1 = generic_fn(1, 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_generic_fn_result_1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `generic_fn_result_2` [INFO] [stdout] --> src/generics.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let generic_fn_result_2 = generic_fn(1.1, 2.1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_generic_fn_result_2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var_a_2` [INFO] [stdout] --> src/lifetimes.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let var_a_2: String; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_var_a_2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var_b` [INFO] [stdout] --> src/lifetimes.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let var_b = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_var_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result1` [INFO] [stdout] --> src/lifetimes.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let result1 = return_a_ref(&var1, var2); // note that var2 is not a reference, and hence lifetimes do not apply. [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `option1` [INFO] [stdout] --> src/generics.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let option1 = GenericEnum::Option1("a str"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_option1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `generic_fn_result_1` [INFO] [stdout] --> src/generics.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let generic_fn_result_1 = generic_fn(1, 2); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_generic_fn_result_1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `generic_fn_result_2` [INFO] [stdout] --> src/generics.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 74 | let generic_fn_result_2 = generic_fn(1.1, 2.1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_generic_fn_result_2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var2` [INFO] [stdout] --> src/ownership_borrowing.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let var2 = var1; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_var2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stack_f32` [INFO] [stdout] --> src/ownership_borrowing.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let stack_f32: f32 = 10.0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stack_f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stack_bool` [INFO] [stdout] --> src/ownership_borrowing.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let stack_bool: bool = true; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stack_bool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stack_char` [INFO] [stdout] --> src/ownership_borrowing.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let stack_char: char = 'a'; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stack_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `inside_scope` [INFO] [stdout] --> src/ownership_borrowing.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | let inside_scope: i32 = 100; // placed directly on the stack above var_char. [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_inside_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_vector1` [INFO] [stdout] --> src/ownership_borrowing.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let heap_vector1: Vec = Vec::new(); // the vec! macro allows to populate the vector with initial vals. [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_vector1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_string1` [INFO] [stdout] --> src/ownership_borrowing.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let heap_string1: String = String::from("Hello"); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_string1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_i8_3` [INFO] [stdout] --> src/ownership_borrowing.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let heap_i8_3 = heap_i8_2.clone(); // remember, this is an expensive op. [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_i8_3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_f64` [INFO] [stdout] --> src/ownership_borrowing.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let heap_f64: Box = Box::new(20.0); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_f64` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_one_v1` is never used [INFO] [stdout] --> src/closures.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | fn add_one_v1(x: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/generics.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 25 | struct Point { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 26 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 27 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcretePoint` is never constructed [INFO] [stdout] --> src/generics.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | struct ConcretePoint { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Option2` and `Option3` are never constructed [INFO] [stdout] --> src/generics.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 54 | enum GenericEnum { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 55 | Option1(T), [INFO] [stdout] 56 | Option2(T), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 57 | Option3, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generic_fn_2` is never used [INFO] [stdout] --> src/generics.rs:106:4 [INFO] [stdout] | [INFO] [stdout] 106 | fn generic_fn_2(arg1: T, arg2: T, arg3: X) -> T [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SOME_INT` is never used [INFO] [stdout] --> src/lifetimes.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | const SOME_INT: i32 = 10; // const have a lifetime of the entire program. [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SOME_STR_1` is never used [INFO] [stdout] --> src/lifetimes.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const SOME_STR_1: &str = "Hi"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SOME_STR_2` is never used [INFO] [stdout] --> src/lifetimes.rs:6:7 [INFO] [stdout] | [INFO] [stdout] 6 | const SOME_STR_2: &str = "There"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SomeStruct` is never constructed [INFO] [stdout] --> src/lifetimes.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct SomeStruct<'a, 'b: 'a> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_a_ref_2` is never used [INFO] [stdout] --> src/lifetimes.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn return_a_ref_2<'a, 'b>(arg: &'a i32, arg2: &'b i32) -> &'a i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_a_ref_3` is never used [INFO] [stdout] --> src/lifetimes.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn return_a_ref_3<'a>(arg: &'a i32, arg2: &'a i32) -> &'a i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_vec_slice` is never used [INFO] [stdout] --> src/lifetimes.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn get_vec_slice(v: &[i32]) -> &[i32] { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_vec_slice_2` is never used [INFO] [stdout] --> src/lifetimes.rs:83:4 [INFO] [stdout] | [INFO] [stdout] 83 | fn get_vec_slice_2<'a>(v1: &'a [i32], v2: &'a [i32]) -> &'a [i32] { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_a_static` is never used [INFO] [stdout] --> src/lifetimes.rs:94:4 [INFO] [stdout] | [INFO] [stdout] 94 | fn return_a_static(arg1: &'static str, arg2: &'static str) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_smaller` is never used [INFO] [stdout] --> src/lifetimes.rs:104:4 [INFO] [stdout] | [INFO] [stdout] 104 | fn get_smaller<'a, T: std::cmp::PartialOrd>(arg1: &'a T, arg2: &'a T) -> &'a T { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/ownership_borrowing.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 5 | struct Point { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 6 | // Structs are on the heap, even if they only have Stack vals. [INFO] [stdout] 7 | x: i32, [INFO] [stdout] | ^ [INFO] [stdout] 8 | y: i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/ownership_borrowing.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 12 | struct CopyPoint { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 15 | x: i32, [INFO] [stdout] | ^ [INFO] [stdout] 16 | y: i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `CopyPoint` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var_a_2` [INFO] [stdout] --> src/lifetimes.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let var_a_2: String; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_var_a_2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var_b` [INFO] [stdout] --> src/lifetimes.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let var_b = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_var_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result1` [INFO] [stdout] --> src/lifetimes.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let result1 = return_a_ref(&var1, var2); // note that var2 is not a reference, and hence lifetimes do not apply. [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `var2` [INFO] [stdout] --> src/ownership_borrowing.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let var2 = var1; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_var2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Map` that must be used [INFO] [stdout] --> src/iterators/mod.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | v2.iter().map(|x| x + 1); // this is also lazy, so nothing happens; collect() is a consuming-adapter however. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 34 | let _ = v2.iter().map(|x| x + 1); // this is also lazy, so nothing happens; collect() is a consuming-adapter however. [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stack_f32` [INFO] [stdout] --> src/ownership_borrowing.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let stack_f32: f32 = 10.0; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stack_f32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stack_bool` [INFO] [stdout] --> src/ownership_borrowing.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let stack_bool: bool = true; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stack_bool` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stack_char` [INFO] [stdout] --> src/ownership_borrowing.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let stack_char: char = 'a'; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stack_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `inside_scope` [INFO] [stdout] --> src/ownership_borrowing.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | let inside_scope: i32 = 100; // placed directly on the stack above var_char. [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_inside_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_vector1` [INFO] [stdout] --> src/ownership_borrowing.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let heap_vector1: Vec = Vec::new(); // the vec! macro allows to populate the vector with initial vals. [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_vector1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_string1` [INFO] [stdout] --> src/ownership_borrowing.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let heap_string1: String = String::from("Hello"); [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_string1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_i8_3` [INFO] [stdout] --> src/ownership_borrowing.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let heap_i8_3 = heap_i8_2.clone(); // remember, this is an expensive op. [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_i8_3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heap_f64` [INFO] [stdout] --> src/ownership_borrowing.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let heap_f64: Box = Box::new(20.0); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heap_f64` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_one_v1` is never used [INFO] [stdout] --> src/closures.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | fn add_one_v1(x: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/generics.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 25 | struct Point { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 26 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 27 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ConcretePoint` is never constructed [INFO] [stdout] --> src/generics.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | struct ConcretePoint { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Option2` and `Option3` are never constructed [INFO] [stdout] --> src/generics.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 54 | enum GenericEnum { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 55 | Option1(T), [INFO] [stdout] 56 | Option2(T), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 57 | Option3, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generic_fn_2` is never used [INFO] [stdout] --> src/generics.rs:106:4 [INFO] [stdout] | [INFO] [stdout] 106 | fn generic_fn_2(arg1: T, arg2: T, arg3: X) -> T [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SOME_INT` is never used [INFO] [stdout] --> src/lifetimes.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | const SOME_INT: i32 = 10; // const have a lifetime of the entire program. [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SOME_STR_1` is never used [INFO] [stdout] --> src/lifetimes.rs:5:7 [INFO] [stdout] | [INFO] [stdout] 5 | const SOME_STR_1: &str = "Hi"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SOME_STR_2` is never used [INFO] [stdout] --> src/lifetimes.rs:6:7 [INFO] [stdout] | [INFO] [stdout] 6 | const SOME_STR_2: &str = "There"; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SomeStruct` is never constructed [INFO] [stdout] --> src/lifetimes.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct SomeStruct<'a, 'b: 'a> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_a_ref_2` is never used [INFO] [stdout] --> src/lifetimes.rs:59:4 [INFO] [stdout] | [INFO] [stdout] 59 | fn return_a_ref_2<'a, 'b>(arg: &'a i32, arg2: &'b i32) -> &'a i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_a_ref_3` is never used [INFO] [stdout] --> src/lifetimes.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn return_a_ref_3<'a>(arg: &'a i32, arg2: &'a i32) -> &'a i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_vec_slice` is never used [INFO] [stdout] --> src/lifetimes.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn get_vec_slice(v: &[i32]) -> &[i32] { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_vec_slice_2` is never used [INFO] [stdout] --> src/lifetimes.rs:83:4 [INFO] [stdout] | [INFO] [stdout] 83 | fn get_vec_slice_2<'a>(v1: &'a [i32], v2: &'a [i32]) -> &'a [i32] { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_a_static` is never used [INFO] [stdout] --> src/lifetimes.rs:94:4 [INFO] [stdout] | [INFO] [stdout] 94 | fn return_a_static(arg1: &'static str, arg2: &'static str) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_smaller` is never used [INFO] [stdout] --> src/lifetimes.rs:104:4 [INFO] [stdout] | [INFO] [stdout] 104 | fn get_smaller<'a, T: std::cmp::PartialOrd>(arg1: &'a T, arg2: &'a T) -> &'a T { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/ownership_borrowing.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 5 | struct Point { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 6 | // Structs are on the heap, even if they only have Stack vals. [INFO] [stdout] 7 | x: i32, [INFO] [stdout] | ^ [INFO] [stdout] 8 | y: i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/ownership_borrowing.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 12 | struct CopyPoint { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 15 | x: i32, [INFO] [stdout] | ^ [INFO] [stdout] 16 | y: i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `CopyPoint` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Map` that must be used [INFO] [stdout] --> src/iterators/mod.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | v2.iter().map(|x| x + 1); // this is also lazy, so nothing happens; collect() is a consuming-adapter however. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 34 | let _ = v2.iter().map(|x| x + 1); // this is also lazy, so nothing happens; collect() is a consuming-adapter however. [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s [INFO] running `Command { std: "docker" "inspect" "7ef0bd2d9ce8ed17a354586656ed6953bb61795a449571f7aa254708c52dabc4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7ef0bd2d9ce8ed17a354586656ed6953bb61795a449571f7aa254708c52dabc4", kill_on_drop: false }` [INFO] [stdout] 7ef0bd2d9ce8ed17a354586656ed6953bb61795a449571f7aa254708c52dabc4