[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#c2e32f1c9652b13ed99608599c1e855462f421f3 for pr-146098-7 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzgblog%2Frust-study" "/workspace/builds/worker-0-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc2/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-0-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/zgblog/rust-study on toolchain c2e32f1c9652b13ed99608599c1e855462f421f3 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "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" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6f1de6104c2f1dc30726ab485f6021b165639bd4d2fad3d3977c8e1de5b46edd [INFO] running `Command { std: "docker" "start" "-a" "6f1de6104c2f1dc30726ab485f6021b165639bd4d2fad3d3977c8e1de5b46edd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6f1de6104c2f1dc30726ab485f6021b165639bd4d2fad3d3977c8e1de5b46edd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6f1de6104c2f1dc30726ab485f6021b165639bd4d2fad3d3977c8e1de5b46edd", kill_on_drop: false }` [INFO] [stdout] 6f1de6104c2f1dc30726ab485f6021b165639bd4d2fad3d3977c8e1de5b46edd [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c2e32f1c9652b13ed99608599c1e855462f421f3" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0aacbb8f13e6bfcd3350d35ee50db44f9a11c381f36ad87acdd7bb7cd83e62f2 [INFO] running `Command { std: "docker" "start" "-a" "0aacbb8f13e6bfcd3350d35ee50db44f9a11c381f36ad87acdd7bb7cd83e62f2", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.155 [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)]` (part of `#[warn(unused)]`) 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] error[E0615]: attempted to take value of method `len` on type `&'a str` [INFO] [stdout] --> src/bin/generics/lifetime_test.rs:58:20 [INFO] [stdout] | [INFO] [stdout] 58 | if x.len() > y.len { [INFO] [stdout] | ^^^ method, not a field [INFO] [stdout] | [INFO] [stdout] help: use parentheses to call the method [INFO] [stdout] | [INFO] [stdout] 58 | if x.len() > y.len() { [INFO] [stdout] | ++ [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)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/collect/string_test.rs:9:9 [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)]` (part of `#[warn(unused)]`) 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] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/generics/lifetime_test.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 56 | fn longest_with_an_announcement<'a, T> (x: &'a str, y: &'a str, ann: T) where T: Display { [INFO] [stdout] | - help: try adding a return type: `-> &'a str` [INFO] [stdout] ... [INFO] [stdout] 59 | x [INFO] [stdout] | ^ expected `()`, found `&str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scores` [INFO] [stdout] --> src/bin/collect/map_test.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let scores: HashMap<_, _> = teams.iter().zip(init_scores.iter()).collect(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_scores` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `study` (bin "lifetime") due to 3 previous errors; 1 warning emitted [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/generics/lifetime_test.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 56 | fn longest_with_an_announcement<'a, T> (x: &'a str, y: &'a str, ann: T) where T: Display { [INFO] [stdout] | - help: try adding a return type: `-> &'a str` [INFO] [stdout] ... [INFO] [stdout] 61 | y [INFO] [stdout] | ^ expected `()`, found `&str` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bin/generics/lifetime_test.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let i = ImportantExcerpt {part: first_sentence}; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0615. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [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)]` (part of `#[warn(unused)]`) 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)]` (part of `#[warn(unused)]`) 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: 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: `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: 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)]` (part of `#[warn(unused)]`) on by default [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)]` (part of `#[warn(unused)]`) 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: 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)]` (part of `#[warn(unused)]`) 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: 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)]` (part of `#[warn(unused)]`) 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)]` (part of `#[warn(unused)]`) on by default [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] [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)]` (part of `#[warn(unused)]`) 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: unused import: `std::fmt::Result` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::fmt::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Result as IoResult` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::io::Result as IoResult; // as 关键字,起别名 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp::Ordering` and `io::Empty` [INFO] [stdout] --> src/main.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | use std::{cmp::Ordering, io::Empty}; // {,} [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Write` and `self` [INFO] [stdout] --> src/main.rs:5:15 [INFO] [stdout] | [INFO] [stdout] 5 | use std::io::{self, Write}; // {自身 , } [INFO] [stdout] | ^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::*` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::*; // 通配符 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/bin/owner.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let s1 = gives_ownership(); // 从函数结果中获取返回所有权 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/bin/owner.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let s3 = takes_and_gives_back(s2); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_length` is never used [INFO] [stdout] --> src/bin/owner.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn calculate_length(s: String) -> (String, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/bin/struct_test.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let user1 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Alabama` is never constructed [INFO] [stdout] --> src/bin/match_test.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 2 | enum UsState { [INFO] [stdout] | ------- variant in this enum [INFO] [stdout] 3 | Alabama, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UsState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Penny`, `Nickel`, and `Dime` are never constructed [INFO] [stdout] --> src/bin/match_test.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 7 | Penny, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 8 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 9 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `w` [INFO] [stdout] --> src/bin/struct_test.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let w = 30; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_w` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `l` [INFO] [stdout] --> src/bin/struct_test.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let l = 50; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_l` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/struct_test.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let a = Rectangle::square(32); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `username`, `email`, `sign_in_count`, and `active` are never read [INFO] [stdout] --> src/bin/struct_test.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 2 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 3 | email: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 4 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 5 | active: bool [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `can_hold` is never used [INFO] [stdout] --> src/bin/struct_test.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 13 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 17 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Color` is never constructed [INFO] [stdout] --> src/bin/struct_test.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | struct Color(i32, i32, i32); // tuple struct [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user` is never used [INFO] [stdout] --> src/bin/struct_test.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `update` is never used [INFO] [stdout] --> src/bin/struct_test.rs:67:4 [INFO] [stdout] | [INFO] [stdout] 67 | fn update(user: User) -> User { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area` is never used [INFO] [stdout] --> src/bin/struct_test.rs:75:4 [INFO] [stdout] | [INFO] [stdout] 75 | fn area(width: u32, length: u32) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `area2` is never used [INFO] [stdout] --> src/bin/struct_test.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn area2(dim: &Rectangle) -> u32 { [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)]` (part of `#[warn(unused)]`) 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] running `Command { std: "docker" "inspect" "0aacbb8f13e6bfcd3350d35ee50db44f9a11c381f36ad87acdd7bb7cd83e62f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0aacbb8f13e6bfcd3350d35ee50db44f9a11c381f36ad87acdd7bb7cd83e62f2", kill_on_drop: false }` [INFO] [stdout] 0aacbb8f13e6bfcd3350d35ee50db44f9a11c381f36ad87acdd7bb7cd83e62f2