[INFO] cloning repository https://github.com/lazylook2/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/lazylook2/rust_study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flazylook2%2Frust_study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flazylook2%2Frust_study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] dcd81ff27c0108cad15d475338dbf701848b27f2 [INFO] checking lazylook2/rust_study against master#b2728d5426bab1d8c39709768c7e22b7f66dde5d for pr-135852 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flazylook2%2Frust_study" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/lazylook2/rust_study on toolchain b2728d5426bab1d8c39709768c7e22b7f66dde5d [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b2728d5426bab1d8c39709768c7e22b7f66dde5d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/lazylook2/rust_study [INFO] finished tweaking git repo https://github.com/lazylook2/rust_study [INFO] tweaked toml for git repo https://github.com/lazylook2/rust_study written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/lazylook2/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" "+b2728d5426bab1d8c39709768c7e22b7f66dde5d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:c80049f3b88b82089a44e0f06d0d6029d44b96b7257e55a1cd63dbc9f4c33334" "/opt/rustwide/cargo-home/bin/cargo" "+b2728d5426bab1d8c39709768c7e22b7f66dde5d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6fb8a97ba4f6a1e3575e1b7ca633b34794cae01f358528e7eae25be0e01677aa [INFO] running `Command { std: "docker" "start" "-a" "6fb8a97ba4f6a1e3575e1b7ca633b34794cae01f358528e7eae25be0e01677aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6fb8a97ba4f6a1e3575e1b7ca633b34794cae01f358528e7eae25be0e01677aa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6fb8a97ba4f6a1e3575e1b7ca633b34794cae01f358528e7eae25be0e01677aa", kill_on_drop: false }` [INFO] [stdout] 6fb8a97ba4f6a1e3575e1b7ca633b34794cae01f358528e7eae25be0e01677aa [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:c80049f3b88b82089a44e0f06d0d6029d44b96b7257e55a1cd63dbc9f4c33334" "/opt/rustwide/cargo-home/bin/cargo" "+b2728d5426bab1d8c39709768c7e22b7f66dde5d" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a352f68364a59a6842d4a3d1dc42bb18c5ded568bd83e40144d7d9fcf6ca0532 [INFO] running `Command { std: "docker" "start" "-a" "a352f68364a59a6842d4a3d1dc42bb18c5ded568bd83e40144d7d9fcf6ca0532", kill_on_drop: false }` [INFO] [stderr] Checking rust_study v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/concurrency.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ErrorKind` and `Error` [INFO] [stdout] --> src/error.rs:2:15 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::{ErrorKind, Read, Error}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `teacher` should have an upper camel case name [INFO] [stdout] --> src/generics_trait.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | pub trait teacher { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `Teacher` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: cannot test inner items [INFO] [stdout] --> src/tests.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnameable_test_items)]` on by default [INFO] [stdout] = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/iterators_closures.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | /// 完整标注的闭包定义 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 23 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [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 doc comment [INFO] [stdout] --> src/iterators_closures.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / /// 闭包定义中省略了类型注解(现在要编译器需要返回类型了,目前编译不通过) [INFO] [stdout] 25 | | // let add_one_v3 = |x| { x + 1 }; [INFO] [stdout] 26 | | /// 去掉了可选的大括号(现在要编译器需要返回类型了,目前编译不通过) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 29 | let example_closure = |x| x; [INFO] [stdout] | ---------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/advanced_features.rs:243:6 [INFO] [stdout] | [INFO] [stdout] 243 | }; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/advanced_features.rs:308:5 [INFO] [stdout] | [INFO] [stdout] 308 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/concurrency.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ErrorKind` and `Error` [INFO] [stdout] --> src/error.rs:2:15 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::{ErrorKind, Read, Error}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `teacher` should have an upper camel case name [INFO] [stdout] --> src/generics_trait.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | pub trait teacher { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper camel case: `Teacher` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/iterators_closures.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | /// 完整标注的闭包定义 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 23 | let add_one_v2 = |x: u32| -> u32 { x + 1 }; [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 doc comment [INFO] [stdout] --> src/iterators_closures.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | / /// 闭包定义中省略了类型注解(现在要编译器需要返回类型了,目前编译不通过) [INFO] [stdout] 25 | | // let add_one_v3 = |x| { x + 1 }; [INFO] [stdout] 26 | | /// 去掉了可选的大括号(现在要编译器需要返回类型了,目前编译不通过) [INFO] [stdout] | |________________________________________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 29 | let example_closure = |x| x; [INFO] [stdout] | ---------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/advanced_features.rs:243:6 [INFO] [stdout] | [INFO] [stdout] 243 | }; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/advanced_features.rs:308:5 [INFO] [stdout] | [INFO] [stdout] 308 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/common.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let y = { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/common.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let number = if condition { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/structs.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let user1 = User{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/structs.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let user2 = User{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/enum_match.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let four = IpAddKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/enum_match.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let home = IpAddr{ kind: IpAddKind::V4, address: String::from("127.0.0.1") }; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_type` [INFO] [stdout] --> src/enum_match.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | fn route (ip_type: IpAddKind) { } [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_type` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/collections.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/collections.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let first = &v[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/collections.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/common.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let y = { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/common.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let number = if condition { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/collections.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | let mut s = String::new(); // 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/collections.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let s = data.to_string(); // 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/collections.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | 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/collections.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | 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: `s` [INFO] [stdout] --> src/collections.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let s = s1 + "-" + &s2; // String 和 &str。s1 被移动了,不能继续使用 [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/collections.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let hello = &s[0..5]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/collections.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let world = &s[6..11]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/collections.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | 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: unused variable: `word` [INFO] [stdout] --> src/collections.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | let word = first_word(&s); // word 的值为 5 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user1` [INFO] [stdout] --> src/structs.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let user1 = User{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/structs.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let user2 = User{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/collections.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut s = String::new(); // String 这样拥有所有权,被移动就回不来了 [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scores` [INFO] [stdout] --> src/collections.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let scores: HashMap<_, _> = teams.iter().zip(initial_scores.iter()).collect(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_scores` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/error.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let mut guess = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/error.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | let mut f = File::open("fuck.txt"); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/generics_trait.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/enum_match.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let four = IpAddKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/enum_match.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let home = IpAddr{ kind: IpAddKind::V4, address: String::from("127.0.0.1") }; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_type` [INFO] [stdout] --> src/enum_match.rs:4:15 [INFO] [stdout] | [INFO] [stdout] 4 | fn route (ip_type: IpAddKind) { } [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_type` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item2` [INFO] [stdout] --> src/generics_trait.rs:108:42 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn notify2(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/collections.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/collections.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let first = &v[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/collections.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/generics_trait.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | fn some_function(t: T, u: U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/generics_trait.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | fn some_function(t: T, u: U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string2` [INFO] [stdout] --> src/generics_trait.rs:243:13 [INFO] [stdout] | [INFO] [stdout] 243 | let string2 = String::from("xyz"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_string2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/generics_trait.rs:305:9 [INFO] [stdout] | [INFO] [stdout] 305 | let s: &'static str = "I have a static lifetime."; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/generics_trait.rs:250:33 [INFO] [stdout] | [INFO] [stdout] 250 | fn longest2<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/collections.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | let mut s = String::new(); // String 这样拥有所有权,被移动就回不来了 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/generics_trait.rs:281:14 [INFO] [stdout] | [INFO] [stdout] 281 | for (i, &item) in bytes.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/collections.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let s = data.to_string(); // 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/collections.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | 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/collections.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | 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: `s` [INFO] [stdout] --> src/collections.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let s = s1 + "-" + &s2; // String 和 &str。s1 被移动了,不能继续使用 [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/collections.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let hello = &s[0..5]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `world` [INFO] [stdout] --> src/collections.rs:79:9 [INFO] [stdout] | [INFO] [stdout] 79 | let world = &s[6..11]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_world` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/collections.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | 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: unused variable: `word` [INFO] [stdout] --> src/collections.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | let word = first_word(&s); // word 的值为 5 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/tests.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | fn greeting(name: &str) -> String { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/iterators_closures.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | 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: `s` [INFO] [stdout] --> src/iterators_closures.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let s = example_closure(String::from("hello")); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/collections.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut s = String::new(); // String 这样拥有所有权,被移动就回不来了 [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scores` [INFO] [stdout] --> src/collections.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | let scores: HashMap<_, _> = teams.iter().zip(initial_scores.iter()).collect(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_scores` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pointers.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let i = 2; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/pointers.rs:26:31 [INFO] [stdout] | [INFO] [stdout] 26 | List::Cons(i, j) => {println!("第二层:{}", i);}, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/error.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | let mut guess = String::new(); [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/error.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | let mut f = File::open("fuck.txt"); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/generics_trait.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/pointers.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/pointers.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | let b = Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/pointers.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/pointers.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | let a = AA{ aa: Rc::clone(&x), bb: 0 }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/pointers.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | let b = AA{ aa: Rc::clone(&x), bb: 1 }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pointers.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | let mut x = Rc::new(3); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item2` [INFO] [stdout] --> src/generics_trait.rs:108:42 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn notify2(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_item2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/generics_trait.rs:116:28 [INFO] [stdout] | [INFO] [stdout] 116 | fn some_function(t: T, u: U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/generics_trait.rs:116:34 [INFO] [stdout] | [INFO] [stdout] 116 | fn some_function(t: T, u: U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `branch` [INFO] [stdout] --> src/pointers.rs:294:9 [INFO] [stdout] | [INFO] [stdout] 294 | let branch = Rc::new( [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string2` [INFO] [stdout] --> src/generics_trait.rs:243:13 [INFO] [stdout] | [INFO] [stdout] 243 | let string2 = String::from("xyz"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_string2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/generics_trait.rs:305:9 [INFO] [stdout] | [INFO] [stdout] 305 | let s: &'static str = "I have a static lifetime."; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/generics_trait.rs:250:33 [INFO] [stdout] | [INFO] [stdout] 250 | fn longest2<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/generics_trait.rs:281:14 [INFO] [stdout] | [INFO] [stdout] 281 | for (i, &item) in bytes.iter().enumerate() { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `add_one_v2` [INFO] [stdout] --> src/iterators_closures.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | 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: `s` [INFO] [stdout] --> src/iterators_closures.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let s = example_closure(String::from("hello")); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `post` [INFO] [stdout] --> src/object_oriented.rs:173:31 [INFO] [stdout] | [INFO] [stdout] 173 | fn content<'a>(&self, post: &'a Post) -> &'a str { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_post` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/patterns.rs:111:19 [INFO] [stdout] | [INFO] [stdout] 111 | let Point{ x, y} = p; [INFO] [stdout] | ^ help: try ignoring the field: `y: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/patterns.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | let y = 10; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pointers.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let i = 2; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/advanced_features.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let slice: &[i32] = unsafe { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/pointers.rs:26:31 [INFO] [stdout] | [INFO] [stdout] 26 | List::Cons(i, j) => {println!("第二层:{}", i);}, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/pointers.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/pointers.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | let b = Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/pointers.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/pointers.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | let a = AA{ aa: Rc::clone(&x), bb: 0 }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/pointers.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | let b = AA{ aa: Rc::clone(&x), bb: 1 }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pointers.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | let mut x = Rc::new(3); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `guess` [INFO] [stdout] --> src/advanced_features.rs:358:13 [INFO] [stdout] | [INFO] [stdout] 358 | let guess: u32 = match guess.trim().parse() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_guess` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `branch` [INFO] [stdout] --> src/pointers.rs:294:9 [INFO] [stdout] | [INFO] [stdout] 294 | let branch = Rc::new( [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_branch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `post` [INFO] [stdout] --> src/object_oriented.rs:173:31 [INFO] [stdout] | [INFO] [stdout] 173 | fn content<'a>(&self, post: &'a Post) -> &'a str { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_post` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `active` is never read [INFO] [stdout] --> src/structs.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 2 | struct User { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 6 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user` is never used [INFO] [stdout] --> src/structs.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | fn build_user(username: String) -> User{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/structs.rs:45:18 [INFO] [stdout] | [INFO] [stdout] 45 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 45 | struct Color((), (), i32); [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `can_hold` is never used [INFO] [stdout] --> src/structs.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 61 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 65 | fn can_hold(&self, other: &Rectangle) -> bool{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `V6` is never constructed [INFO] [stdout] --> src/enum_match.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | enum IpAddKind {V4,V6,} [INFO] [stdout] | --------- ^^ [INFO] [stdout] | | [INFO] [stdout] | variant in this enum [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `kind` and `address` are never read [INFO] [stdout] --> src/enum_match.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | struct IpAddr { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 7 | kind: IpAddKind, [INFO] [stdout] | ^^^^ [INFO] [stdout] 8 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/enum_match.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 13 | Quit, // 没有关联任何数据 [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | Move {x: i32, y: i32}, // 包含一个匿名结构体 [INFO] [stdout] | ^^^^ [INFO] [stdout] 15 | Write(String), // 包含单独一个 String [INFO] [stdout] 16 | ChangeColor(i32, i32, i32), // 包含三个 i32 [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/collections.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | Int(i32), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 34 | Int(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/collections.rs:35:15 [INFO] [stdout] | [INFO] [stdout] 35 | Float(f64), [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 35 | Float(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/collections.rs:36:14 [INFO] [stdout] | [INFO] [stdout] 36 | Text(String), [INFO] [stdout] | ---- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 36 | Text(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `parse_config` is never used [INFO] [stdout] --> src/collections.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | fn parse_config(args: &[String]) -> (&str, &str) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file1` is never used [INFO] [stdout] --> src/error.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 69 | fn read_username_from_file1() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Guess` is never constructed [INFO] [stdout] --> src/error.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | pub struct Guess { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `value` are never used [INFO] [stdout] --> src/error.rs:109:16 [INFO] [stdout] | [INFO] [stdout] 108 | impl Guess { [INFO] [stdout] | ---------- associated items in this implementation [INFO] [stdout] 109 | pub fn new(value: i32) -> Guess { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 117 | pub fn value(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/generics_trait.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 28 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 29 | x: T, [INFO] [stdout] 30 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Option` is never used [INFO] [stdout] --> src/generics_trait.rs:34:10 [INFO] [stdout] | [INFO] [stdout] 34 | enum Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/generics_trait.rs:38:10 [INFO] [stdout] | [INFO] [stdout] 38 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point1` is never constructed [INFO] [stdout] --> src/generics_trait.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | struct Point1 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mixup` is never used [INFO] [stdout] --> src/generics_trait.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 54 | impl Point1 { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] 55 | fn mixup(self, other: Point1) -> Point1 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `teacher` is never used [INFO] [stdout] --> src/generics_trait.rs:73:15 [INFO] [stdout] | [INFO] [stdout] 73 | pub trait teacher { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify` is never used [INFO] [stdout] --> src/generics_trait.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn notify(item: impl School) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify1` is never used [INFO] [stdout] --> src/generics_trait.rs:105:12 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn notify1(item: &T) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify2` is never used [INFO] [stdout] --> src/generics_trait.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | pub fn notify2(item1: &T, item2: &T) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `notify3` is never used [INFO] [stdout] --> src/generics_trait.rs:112:12 [INFO] [stdout] | [INFO] [stdout] 112 | pub fn notify3(item: T) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `some_function` is never used [INFO] [stdout] --> src/generics_trait.rs:116:8 [INFO] [stdout] | [INFO] [stdout] 116 | fn some_function(t: T, u: U) -> i32 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_school` is never used [INFO] [stdout] --> src/generics_trait.rs:123:8 [INFO] [stdout] | [INFO] [stdout] 123 | fn return_school() -> impl School { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest2` is never used [INFO] [stdout] --> src/generics_trait.rs:250:8 [INFO] [stdout] | [INFO] [stdout] 250 | fn longest2<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> src/generics_trait.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | fn first_word(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `announce_and_return_part` is never used [INFO] [stdout] --> src/generics_trait.rs:298:12 [INFO] [stdout] | [INFO] [stdout] 295 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 298 | fn announce_and_return_part(&self, announcement: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest_with_an_announcement` is never used [INFO] [stdout] --> src/generics_trait.rs:308:8 [INFO] [stdout] | [INFO] [stdout] 308 | fn longest_with_an_announcement<'a, T>(x: &'a str, y: &'a str, ann: T) -> &'a str [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `expensive_test` is never used [INFO] [stdout] --> src/tests.rs:102:8 [INFO] [stdout] | [INFO] [stdout] 102 | fn expensive_test() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `value` is never read [INFO] [stdout] --> src/tests.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 48 | pub struct Guess { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 49 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate` is never used [INFO] [stdout] --> src/iterators_closures.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | fn calculate(a: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_one_v1` is never used [INFO] [stdout] --> src/iterators_closures.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | fn add_one_v1 (x: u32) -> u32 { x + 1 } [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cacher` is never constructed [INFO] [stdout] --> src/iterators_closures.rs:36:12 [INFO] [stdout] | [INFO] [stdout] 36 | struct Cacher [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `value` are never used [INFO] [stdout] --> src/iterators_closures.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl Cacher where T: Fn(u32) -> u32 [INFO] [stdout] | ----------------------------------------- associated items in this implementation [INFO] [stdout] 43 | { [INFO] [stdout] 44 | fn new (calculation: T) -> Cacher{ [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | fn value (&mut self, arg: u32) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/pointers.rs:146:14 [INFO] [stdout] | [INFO] [stdout] 146 | Cons(i32, Rc), [INFO] [stdout] | ---- ^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields 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] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 146 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `aa` and `bb` are never read [INFO] [stdout] --> src/pointers.rs:173:17 [INFO] [stdout] | [INFO] [stdout] 173 | struct AA { aa: Rc, bb: i32 } [INFO] [stdout] | -- ^^ ^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/pointers.rs:253:14 [INFO] [stdout] | [INFO] [stdout] 253 | Cons(Rc>, Rc), [INFO] [stdout] | ---- ^^^^^^^^^^^^^^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields 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] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 253 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/pointers.rs:272:10 [INFO] [stdout] | [INFO] [stdout] 272 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `tail` is never used [INFO] [stdout] --> src/pointers.rs:278:12 [INFO] [stdout] | [INFO] [stdout] 277 | impl List { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 278 | fn tail(&self) -> Option<&RefCell>> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `value` and `children` are never read [INFO] [stdout] --> src/pointers.rs:288:9 [INFO] [stdout] | [INFO] [stdout] 287 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 288 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 289 | 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: fields `width`, `height`, and `label` are never read [INFO] [stdout] --> src/object_oriented.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 75 | pub struct Button { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 76 | pub width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 77 | pub height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 78 | pub label: String [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width`, `height`, and `options` are never read [INFO] [stdout] --> src/object_oriented.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 85 | struct SelectBox { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 86 | width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 87 | height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 88 | options: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Post` is never constructed [INFO] [stdout] --> src/object_oriented.rs:134:16 [INFO] [stdout] | [INFO] [stdout] 134 | pub struct Post { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_text`, `content`, `request_review`, and `approve` are never used [INFO] [stdout] --> src/object_oriented.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 138 | impl Post { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 139 | pub fn new () -> Post{ [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 143 | pub fn add_text(&mut self, text: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 152 | pub fn content(&self) -> &str{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 155 | pub fn request_review(&mut self){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 162 | pub fn approve(&mut self){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `State` is never used [INFO] [stdout] --> src/object_oriented.rs:170:11 [INFO] [stdout] | [INFO] [stdout] 170 | trait State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Draft` is never constructed [INFO] [stdout] --> src/object_oriented.rs:178:13 [INFO] [stdout] | [INFO] [stdout] 178 | struct Draft {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `PendingReview` is never constructed [INFO] [stdout] --> src/object_oriented.rs:188:12 [INFO] [stdout] | [INFO] [stdout] 188 | struct PendingReview {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Published` is never constructed [INFO] [stdout] --> src/object_oriented.rs:198:12 [INFO] [stdout] | [INFO] [stdout] 198 | struct Published {} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `Write` are never constructed [INFO] [stdout] --> src/patterns.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 125 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 126 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 127 | Move { x: i32, y: i32}, [INFO] [stdout] | ^^^^ [INFO] [stdout] 128 | Write (String), [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Rgb` is never constructed [INFO] [stdout] --> src/patterns.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 139 | enum Color { [INFO] [stdout] | ----- variant in this enum [INFO] [stdout] 140 | Rgb(i32, i32, i32), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, and `Write` are never constructed [INFO] [stdout] --> src/patterns.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 143 | enum Message1 { [INFO] [stdout] | -------- variants in this enum [INFO] [stdout] 144 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 145 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 146 | Write(String), [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_at_mut1` is never used [INFO] [stdout] --> src/advanced_features.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn split_at_mut1(slice: &mut [i32], mid: usize) -> (&mut [i32], &mut [i32]) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unsafe_rust6` is never used [INFO] [stdout] --> src/advanced_features.rs:86:4 [INFO] [stdout] | [INFO] [stdout] 86 | fn unsafe_rust6() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Wizard` is never used [INFO] [stdout] --> src/advanced_features.rs:208:11 [INFO] [stdout] | [INFO] [stdout] 208 | trait Wizard { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/advanced_features.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 241 | struct Dog { [INFO] [stdout] | --- field in this struct [INFO] [stdout] 242 | name: String [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `OutlinePrint` is never used [INFO] [stdout] --> src/advanced_features.rs:268:11 [INFO] [stdout] | [INFO] [stdout] 268 | trait OutlinePrint: fmt::Display { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Result` is never used [INFO] [stdout] --> src/advanced_features.rs:338:10 [INFO] [stdout] | [INFO] [stdout] 338 | type Result = std::result::Result; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Write` is never used [INFO] [stdout] --> src/advanced_features.rs:339:15 [INFO] [stdout] | [INFO] [stdout] 339 | pub trait Write { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Stop` is never constructed [INFO] [stdout] --> src/advanced_features.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 451 | enum Status { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 452 | Value(u32), [INFO] [stdout] 453 | Stop, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_closure` is never used [INFO] [stdout] --> src/advanced_features.rs:481:8 [INFO] [stdout] | [INFO] [stdout] 481 | fn returns_closure() -> Box i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `String1` should have a snake case name [INFO] [stdout] --> src/collections.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn String1() { [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `string1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `Closures` should have a snake case name [INFO] [stdout] --> src/iterators_closures.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn Closures() { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `closures` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `Iterator` should have a snake case name [INFO] [stdout] --> src/iterators_closures.rs:102:8 [INFO] [stdout] | [INFO] [stdout] 102 | pub fn Iterator() { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `iterator` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `Rc` should have a snake case name [INFO] [stdout] --> src/pointers.rs:143:8 [INFO] [stdout] | [INFO] [stdout] 143 | pub fn Rc () { [INFO] [stdout] | ^^ help: convert the identifier to snake case: `rc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/advanced_features.rs:82:33 [INFO] [stdout] | [INFO] [stdout] 82 | println!("COUNTER: {}", COUNTER); [INFO] [stdout] | ^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/patterns.rs:111:19 [INFO] [stdout] | [INFO] [stdout] 111 | let Point{ x, y} = p; [INFO] [stdout] | ^ help: try ignoring the field: `y: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/patterns.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | let y = 10; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `macro_rules!` definition, `#[macro_export]` macro should be written at top level module [INFO] [stdout] --> src/advanced_features.rs:491:5 [INFO] [stdout] | [INFO] [stdout] 491 | / macro_rules! my_vec { [INFO] [stdout] 492 | | ( $( $x: expr ), * ) => { [INFO] [stdout] 493 | | { [INFO] [stdout] 494 | | let mut temp_vec = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 501 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current function `macros1` [INFO] [stdout] = note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> src/advanced_features.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let slice: &[i32] = unsafe { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `guess` [INFO] [stdout] --> src/advanced_features.rs:358:13 [INFO] [stdout] | [INFO] [stdout] 358 | let guess: u32 = match guess.trim().parse() { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_guess` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `active` is never read [INFO] [stdout] --> src/structs.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 2 | struct User { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 6 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `build_user` is never used [INFO] [stdout] --> src/structs.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | fn build_user(username: String) -> User{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/structs.rs:45:18 [INFO] [stdout] | [INFO] [stdout] 45 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 45 | struct Color((), (), i32); [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not parse/generate dep info at: /opt/rustwide/target/debug/deps/rust_study-b83577688c099ec5.d [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] failed to write `/opt/rustwide/target/debug/.fingerprint/rust_study-b83577688c099ec5/dep-test-lib-rust_study` [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] No space left on device (os error 28) [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `rust_study` (lib); 57 warnings emitted [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] No space left on device (os error 28) [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] failed to parse process output: `/opt/rustwide/rustup-home/toolchains/b2728d5426bab1d8c39709768c7e22b7f66dde5d/bin/rustc --crate-name rust_study --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=ce0142515cd84ec6 -C extra-filename=-d67f6159a89d3299 --out-dir /opt/rustwide/target/debug/deps -L dependency=/opt/rustwide/target/debug/deps --cap-lints=forbid` (exit status: 0) [INFO] running `Command { std: "docker" "inspect" "a352f68364a59a6842d4a3d1dc42bb18c5ded568bd83e40144d7d9fcf6ca0532", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a352f68364a59a6842d4a3d1dc42bb18c5ded568bd83e40144d7d9fcf6ca0532", kill_on_drop: false }` [INFO] [stdout] a352f68364a59a6842d4a3d1dc42bb18c5ded568bd83e40144d7d9fcf6ca0532