[INFO] cloning repository https://github.com/zgblog/rust-study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/zgblog/rust-study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzgblog%2Frust-study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzgblog%2Frust-study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 979810785a1ae2349cfb7e0529b386adef18ccd9 [INFO] testing zgblog/rust-study against try#8de4c7234dd9b97c9d76b58671343fdbbc9a433e+target=x86_64-unknown-linux-musl for musl_upgrade_1_2_5_with_libc_patch_0 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzgblog%2Frust-study" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/zgblog/rust-study [INFO] finished tweaking git repo https://github.com/zgblog/rust-study [INFO] tweaked toml for git repo https://github.com/zgblog/rust-study written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/zgblog/rust-study on toolchain 8de4c7234dd9b97c9d76b58671343fdbbc9a433e [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/zgblog/rust-study 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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f67179b5277b6e61955a9dbb1ceb98c964a09d88de00f01abdb9e1ac57d276bc [INFO] running `Command { std: "docker" "start" "-a" "f67179b5277b6e61955a9dbb1ceb98c964a09d88de00f01abdb9e1ac57d276bc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f67179b5277b6e61955a9dbb1ceb98c964a09d88de00f01abdb9e1ac57d276bc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f67179b5277b6e61955a9dbb1ceb98c964a09d88de00f01abdb9e1ac57d276bc", kill_on_drop: false }` [INFO] [stdout] f67179b5277b6e61955a9dbb1ceb98c964a09d88de00f01abdb9e1ac57d276bc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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" "-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" "+8de4c7234dd9b97c9d76b58671343fdbbc9a433e" "build" "--frozen" "--message-format=json" "--target" "x86_64-unknown-linux-musl", kill_on_drop: false }` [INFO] [stdout] 1e4d476835cc3781baa41de433147b0bd8bf5df4b9f3d0ec7bbff6820dfc6340 [INFO] running `Command { std: "docker" "start" "-a" "1e4d476835cc3781baa41de433147b0bd8bf5df4b9f3d0ec7bbff6820dfc6340", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Compiling ppv-lite86 v0.2.17 [INFO] [stderr] Compiling getrandom v0.2.15 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling study v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field `seasonal_fruit` is never read [INFO] [stdout] --> src/lib.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Breakfast{ [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 3 | pub toast: String, [INFO] [stdout] 4 | seasonal_fruit: String [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Appetizer` is never used [INFO] [stdout] --> src/lib.rs:16:14 [INFO] [stdout] | [INFO] [stdout] 16 | pub enum Appetizer {} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `seat_at_table` is never used [INFO] [stdout] --> src/lib.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | fn seat_at_table() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_order` is never used [INFO] [stdout] --> src/lib.rs:27:12 [INFO] [stdout] | [INFO] [stdout] 27 | fn take_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_payment` is never used [INFO] [stdout] --> src/lib.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 29 | fn take_payment() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `todo` is never used [INFO] [stdout] --> src/back_of_house/hosting.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn todo() {} [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Cons` and `Nil` [INFO] [stdout] --> src/bin/smartpointer/refcell_test.rs:77:19 [INFO] [stdout] | [INFO] [stdout] 77 | use crate::List::{Cons, Nil}; [INFO] [stdout] | ^^^^ ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0601]: `main` function not found in crate `refcell` [INFO] [stdout] --> src/bin/smartpointer/refcell_test.rs:94:2 [INFO] [stdout] | [INFO] [stdout] 94 | } [INFO] [stdout] | ^ consider adding a `main` function to `src/bin/smartpointer/refcell_test.rs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/collect/string_test.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut s = String::new(); [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/bin/collect/string_test.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let s = data.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/bin/collect/string_test.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | 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/bin/collect/string_test.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | 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: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let hello = String::from("السلام عليكم"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let hello = String::from("Dobrý den"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let hello = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let hello = String::from("שָׁלוֹם"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let hello = String::from("नमस्ते"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let hello = String::from("こんにちは"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | let hello = String::from("안녕하세요"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let hello = String::from("你好"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let hello = String::from("Olá"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let hello = String::from("Здравствуйте"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/collect/string_test.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let hello = String::from("Hola"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/collect/string_test.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | 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: trait `Summary_2` should have an upper camel case name [INFO] [stdout] --> src/bin/generics/trait_test.rs:23:7 [INFO] [stdout] | [INFO] [stdout] 23 | trait Summary_2 { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `Summary2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Summary_3` should have an upper camel case name [INFO] [stdout] --> src/bin/generics/trait_test.rs:29:7 [INFO] [stdout] | [INFO] [stdout] 29 | trait Summary_3 { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to upper camel case: `Summary3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `result` [INFO] [stdout] --> src/bin/io/command.rs:1:43 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{env, error::Error, fs, process, result}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/bin/optional.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/bin/optional.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | 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: `absend_number` [INFO] [stdout] --> src/bin/optional.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let absend_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absend_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/bin/optional.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0601`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/bin/generics/trait_test.rs:90:19 [INFO] [stdout] | [INFO] [stdout] 90 | fn notify_5(t: T, u: U) where T: Display + Clone, U: Clone + Debug { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/bin/generics/trait_test.rs:90:25 [INFO] [stdout] | [INFO] [stdout] 90 | fn notify_5(t: T, u: U) where T: Display + Clone, U: Clone + Debug { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Summary_2` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:23:7 [INFO] [stdout] | [INFO] [stdout] 23 | trait Summary_2 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Summary_3` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:29:7 [INFO] [stdout] | [INFO] [stdout] 29 | trait Summary_3 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:65:4 [INFO] [stdout] | [INFO] [stdout] 65 | fn notify(item: impl Summary) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify_2` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:72:4 [INFO] [stdout] | [INFO] [stdout] 72 | fn notify_2(item: T) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify_3` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn notify_3(item: impl Summary + Display) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify_4` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:83:4 [INFO] [stdout] | [INFO] [stdout] 83 | fn notify_4(item: T) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify_5` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:90:4 [INFO] [stdout] | [INFO] [stdout] 90 | fn notify_5(t: T, u: U) where T: Display + Clone, U: Clone + Debug { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/error/result_test.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let f = match f { [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: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bin/generics/gen_test.rs:90:11 [INFO] [stdout] | [INFO] [stdout] 90 | if(self.x >= self.y) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 90 - if(self.x >= self.y) { [INFO] [stdout] 90 + if self.x >= self.y { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_summarizable` is never used [INFO] [stdout] --> src/bin/generics/trait_test.rs:97:4 [INFO] [stdout] | [INFO] [stdout] 97 | fn return_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `len` [INFO] [stdout] --> src/bin/borrow.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let len = update(&mut s2); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_len` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/slice.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let hello = &s[..5]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/error/result_test.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let f = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/bin/slice.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let world = &s[6..]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `whold` [INFO] [stdout] --> src/bin/slice.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let whold = &s[..]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_whold` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `study` (bin "refcell") due to 1 previous error; 1 warning emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `p3` [INFO] [stdout] --> src/bin/generics/gen_test.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let p3 = p1.mixup(p2); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_p3` [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/bin/slice.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let mut s = String::from("Hello world!"); [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 doc comment [INFO] [stdout] --> src/bin/closures/closure_test.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / /** [INFO] [stdout] 26 | | * 闭包,语法 |xxx| {} [INFO] [stdout] 27 | | */ [INFO] [stdout] | |_______^ [INFO] [stdout] 28 | / let mut expensive_result = Cacher::new(|num| { [INFO] [stdout] 29 | | println!("calculating slowly..."); [INFO] [stdout] 30 | | thread::sleep(Duration::from_secs(2)); [INFO] [stdout] 31 | | num [INFO] [stdout] 32 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/error/result_test.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let f = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/error/result_test.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | let f = File::open("hello.txt").expect("Failed to open hello.txt"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `result_2` is never used [INFO] [stdout] --> src/bin/error/result_test.rs:20:4 [INFO] [stdout] | [INFO] [stdout] 20 | fn result_2() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `result_3` is never used [INFO] [stdout] --> src/bin/error/result_test.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | fn result_3() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `result_4` is never used [INFO] [stdout] --> src/bin/error/result_test.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn result_4() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `result_5` is never used [INFO] [stdout] --> src/bin/error/result_test.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn result_5() -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `result_6` is never used [INFO] [stdout] --> src/bin/error/result_test.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn result_6() -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/bin/smartpointer/mem_leak.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | Cons(i32, RefCell>), [INFO] [stdout] | ---- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `List` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = 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] 7 - Cons(i32, RefCell>), [INFO] [stdout] 7 + Cons((), RefCell>), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `value` and `children` are never read [INFO] [stdout] --> src/bin/smartpointer/mem_leak.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 46 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 47 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 48 | children: RefCell>>, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_i32` is never used [INFO] [stdout] --> src/bin/generics/gen_test.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn largest_i32(list: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `largest_char` is never used [INFO] [stdout] --> src/bin/generics/gen_test.rs:26:4 [INFO] [stdout] | [INFO] [stdout] 26 | fn largest_char(list: &[char]) -> char { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/bin/generics/gen_test.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 57 | impl Point { [INFO] [stdout] | ---------------------- method in this implementation [INFO] [stdout] 58 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/bin/generics/gen_test.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/bin/generics/gen_test.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 80 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 81 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/bin/generics/gen_test.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 88 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 89 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/bin/slice.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let slice = &a[1..3]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_world2` is never used [INFO] [stdout] --> src/bin/slice.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn first_world2(s: &str) -> &str { // 字符串切片作为函数参数 [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `array_slice` is never used [INFO] [stdout] --> src/bin/slice.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | fn array_slice() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simulated_expensive_calculation` is never used [INFO] [stdout] --> src/bin/closures/closure_test.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | 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] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/bin/function.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let x = 5; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number2` [INFO] [stdout] --> src/bin/function.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let number2 = if true {5} else {6}; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_number2` [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "1e4d476835cc3781baa41de433147b0bd8bf5df4b9f3d0ec7bbff6820dfc6340", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1e4d476835cc3781baa41de433147b0bd8bf5df4b9f3d0ec7bbff6820dfc6340", kill_on_drop: false }` [INFO] [stdout] 1e4d476835cc3781baa41de433147b0bd8bf5df4b9f3d0ec7bbff6820dfc6340