[INFO] cloning repository https://github.com/kyssion/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/kyssion/rust_study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyssion%2Frust_study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyssion%2Frust_study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] aecc129264ad6461ce237d018195ae028991c0cd [INFO] checking kyssion/rust_study against try#8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 for pr-82565 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkyssion%2Frust_study" "/workspace/builds/worker-2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/kyssion/rust_study on toolchain 8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/kyssion/rust_study [INFO] finished tweaking git repo https://github.com/kyssion/rust_study [INFO] tweaked toml for git repo https://github.com/kyssion/rust_study written to /workspace/builds/worker-2/source/Cargo.toml [INFO] crate git repo https://github.com/kyssion/rust_study already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "fetch" "--locked" "--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-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/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" "rustops/crates-build-env@sha256:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ebcfc64c4d978638f5999f5ade8df9cf83db7c05cbfec095dc23d08e779db227 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "ebcfc64c4d978638f5999f5ade8df9cf83db7c05cbfec095dc23d08e779db227", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ebcfc64c4d978638f5999f5ade8df9cf83db7c05cbfec095dc23d08e779db227", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ebcfc64c4d978638f5999f5ade8df9cf83db7c05cbfec095dc23d08e779db227", kill_on_drop: false }` [INFO] [stdout] ebcfc64c4d978638f5999f5ade8df9cf83db7c05cbfec095dc23d08e779db227 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "rustops/crates-build-env@sha256:f2f6bcd4b43ebee4e173f653a26493129bdb64017c85f916b780ca7fbdbaa79d" "/opt/rustwide/cargo-home/bin/cargo" "+8e3afc79c11f48cb3acd1be5b3b7de98fe3f93a8" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 1d57b83af382dbc933dadae9dfd42f6d543b4697a7f85aeb912981ee1f42d3e0 [INFO] running `Command { std: "docker" "start" "-a" "1d57b83af382dbc933dadae9dfd42f6d543b4697a7f85aeb912981ee1f42d3e0", kill_on_drop: false }` [INFO] [stderr] Checking rand_os v0.1.3 [INFO] [stderr] Checking rand v0.6.5 [INFO] [stderr] Checking rust_study v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `Coin`, `test_match` [INFO] [stdout] --> src/main.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::rust0004_enum_and_match::{test_match, Coin}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::convert::TryInto` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::convert::TryInto; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::rust0008_generics::Summary` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::rust0008_generics::Summary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | let i = if(i>3){ [INFO] [stdout] | ^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `iter::Sum` [INFO] [stdout] --> src/rust0000_official_example.rs:2:26 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{cmp::Ordering, iter::Sum}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::convert::TryInto` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::convert::TryInto; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NO_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | NO_MESSAGE(), [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `NoMessage` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `INT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | INT_MESSAGE(i32,i32), [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `IntMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STR_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | STR_MESSAGE(String,String,String), [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `StrMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `FLOAT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | FLOAT_MESSAGE(f32,f64), [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `FloatMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STRUCT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | STRUCT_MESSAGE(TestStruct), //todo 结构体元组 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `StructMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `DEFAULT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | DEFAULT_MESSAGE{item_int:i32} //直接定义对象 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `DefaultMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::rust0005_pakage_module_other::front_of_house::hosting as two` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | use crate::rust0005_pakage_module_other::front_of_house::hosting as two; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self::front_of_house2::hosting::add_to_wait_list as one` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | use self::front_of_house2::hosting::add_to_wait_list as one; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp::Ordering`, `io` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:68:11 [INFO] [stdout] | [INFO] [stdout] 68 | use std::{cmp::Ordering,io}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::*` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | use std::*; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Coin`, `test_match` [INFO] [stdout] --> src/main.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::rust0004_enum_and_match::{test_match, Coin}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::convert::TryInto` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::convert::TryInto; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/main.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Add` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::ops::Add; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::rust0008_generics::Summary` [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use crate::rust0008_generics::Summary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | let i = if(i>3){ [INFO] [stdout] | ^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `iter::Sum` [INFO] [stdout] --> src/rust0000_official_example.rs:2:26 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{cmp::Ordering, iter::Sum}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::convert::TryInto` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::convert::TryInto; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NO_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | NO_MESSAGE(), [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to upper camel case: `NoMessage` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `INT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | INT_MESSAGE(i32,i32), [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `IntMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STR_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | STR_MESSAGE(String,String,String), [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to upper camel case: `StrMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `FLOAT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | FLOAT_MESSAGE(f32,f64), [INFO] [stdout] | ^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `FloatMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `STRUCT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | STRUCT_MESSAGE(TestStruct), //todo 结构体元组 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `StructMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `DEFAULT_MESSAGE` should have an upper camel case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | DEFAULT_MESSAGE{item_int:i32} //直接定义对象 [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `DefaultMessage` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::rust0005_pakage_module_other::front_of_house::hosting as two` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | use crate::rust0005_pakage_module_other::front_of_house::hosting as two; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self::front_of_house2::hosting::add_to_wait_list as one` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | use self::front_of_house2::hosting::add_to_wait_list as one; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::Rng` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:65:5 [INFO] [stdout] | [INFO] [stdout] 65 | use rand::Rng; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `cmp::Ordering`, `io` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:68:11 [INFO] [stdout] | [INFO] [stdout] 68 | use std::{cmp::Ordering,io}; [INFO] [stdout] | ^^^^^^^^^^^^^ ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::*` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:74:5 [INFO] [stdout] | [INFO] [stdout] 74 | use std::*; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Penny` is named the same as one of the variants of the type `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ^^^^^ help: to match on the variant, qualify the path: `Coin::Penny` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bindings_with_variant_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Nickel` is named the same as one of the variants of the type `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ help: to match on the variant, qualify the path: `Coin::Nickel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Dime` is named the same as one of the variants of the type `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ help: to match on the variant, qualify the path: `Coin::Dime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 77 | Coin::Quarter(one,tow)=>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 81 | _ =>{ //todo 使用通配符_ 可以匹配其他未知情况 [INFO] [stdout] | ^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/main.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let p = &mut arr; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let z = arr[0]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value1` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let value1 = 10; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_value1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value1` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let value1 = "sdfsdf"; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_value1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `value2` is assigned to, but never used [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let mut value2 = 10; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_value2` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `value2` is never read [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | value2 = 11; // 可以进行修改 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let i: i8; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let i: i16; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let i: i32; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let i: i64; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let i: i128; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let i: usize; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let f:f32; [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/rust0001_var_and_control_flow.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let f:f64; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let b:bool = false; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let b : bool = true; [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/rust0001_var_and_control_flow.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let c : char = '总'; [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/rust0001_var_and_control_flow.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | let (a,b,_) = y; // rust 这里和golang的处理方法类似使用_ 来丢弃不用的值 [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/rust0001_var_and_control_flow.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | let (a,b,_) = y; // rust 这里和golang的处理方法类似使用_ 来丢弃不用的值 [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/rust0001_var_and_control_flow.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let c = y.1;// 元组可以使用的后缀+ 数字来确定标记位置 [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/rust0001_var_and_control_flow.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let a = [1,2,3,4,5,6]; // 数组初始化 [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/rust0001_var_and_control_flow.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let b : [i32; 10]; // 初始化声明数组 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let str = "&str"; // 这个是字符串字面量,不能进行修改 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let str = String::from("String"); //堆分配字符串 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let i = 123;// 赋值语句是语句不是表达式 所以不能想其他语言一样使用 a=b=12 这种方法赋值 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let i = if(i>3){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let item = loop{ [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn func_test(i : i32)-> String{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | let a = if number<5{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | let item = loop{ [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let a = while number<5 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/rust0000_official_example.rs:40:15 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn notify(item: impl Summary){} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0002_ownership.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut str = "str item"; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/rust0002_ownership.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let j = i; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0002_ownership.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let v = j.clone();//使用clone 可以获取一个string字符串的clone [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/rust0002_ownership.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let s = test_fn(s);// 此时S已经没有任何作用域的信息 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/rust0002_ownership.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let z = &i; // 获取这个值的引用 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/rust0002_ownership.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let j = &mut i; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `itemStr` [INFO] [stdout] --> src/rust0002_ownership.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let itemStr = &str[0..1]; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_itemStr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user` [INFO] [stdout] --> src/rust0003_struct_1.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let mut user = User{ [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_user` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0003_struct_1.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let i = item_y.0; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `area` [INFO] [stdout] --> src/rust0003_struct_1.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let area = area(&rect1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_area` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `area` [INFO] [stdout] --> src/rust0003_struct_2.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let area = area(&rect1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_area` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/rust0003_struct_2.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let p =Rectangle::square(12); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let four = IpAddrKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let six = IpAddrKind::V6; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tow` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let tow = Some("sdfsdf"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_tow` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sss` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let sss = one.expect("ddd"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sss` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_type` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 53 | fn route(ip_type: IpAddrKind){ [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_type` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Penny` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_Penny` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Nickel` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_Nickel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Dime` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_Dime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0006_collection.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut v = vec![1,2,3,4]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0006_collection.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let i = &v[1]; // 这个会有越界 问题 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0006_collection.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let i = v.get(1); // 这个不会有 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/rust0006_collection.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let row = vec![SpreadsheetCell::Int(3),SpreadsheetCell::Float(5.4),SpreadsheetCell::Text(String::from("ffff"))]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/rust0006_collection.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let mut s = String::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0006_collection.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let str = str.to_string();//todo 如果是实现了 display trait 类型的话,就可以调用to_string 方法来获取进行序列化的之后的值 ... [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0006_collection.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let str = "this is a str".to_string(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0006_collection.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let str = String::from("this is a str"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stringItem` [INFO] [stdout] --> src/rust0006_collection.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut stringItem = String::from("AABBCCDDEEFF"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stringItem` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_hash_map` [INFO] [stdout] --> src/rust0006_collection.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | let my_hash_map :HashMap<&&str,&&str> = keys.iter().zip(values.iter()).collect(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_hash_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key` [INFO] [stdout] --> src/rust0006_collection.rs:104:10 [INFO] [stdout] | [INFO] [stdout] 104 | for (key,value) in &my_hash_map{ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/rust0006_collection.rs:104:14 [INFO] [stdout] | [INFO] [stdout] 104 | for (key,value) in &my_hash_map{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value_str` [INFO] [stdout] --> src/rust0006_collection.rs:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | let value_str = my_hash_map.entry(str).or_insert(0); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_value_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `error` [INFO] [stdout] --> src/rust0007_error.rs:33:56 [INFO] [stdout] | [INFO] [stdout] 33 | File::create("hello.txxt").unwrap_or_else(|error|{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_error` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/rust0007_error.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | Err(e) => panic!("error") [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other_error` [INFO] [stdout] --> src/rust0007_error.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | other_error => panic!("other error") [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_other_error` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/rust0007_error.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let f = File::open("ffff").map_err(|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/rust0007_error.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let f = File::open("fff").expect("this is 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/rust0007_error.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let f = File::open("fff").unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/rust0008_generics.rs:85:22 [INFO] [stdout] | [INFO] [stdout] 85 | fn test_trait_params(t : impl Summary+Summary2){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/rust0008_generics.rs:89:48 [INFO] [stdout] | [INFO] [stdout] 89 | fn test_trait_params_up (t: T,p:T){ //todo 注意这里,这里使用了范型,那么,rust会强制要求t.p 大类型相同,而不是都实现 ... [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/rust0008_generics.rs:89:53 [INFO] [stdout] | [INFO] [stdout] 89 | fn test_trait_params_up (t: T,p:T){ //todo 注意这里,这里使用了范型,那么,rust会强制要求t.p 大类型相同,而不是都实现 ... [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/rust0008_generics.rs:95:33 [INFO] [stdout] | [INFO] [stdout] 95 | fn test_trait_params_end (t:T,u:U) ->String where T:Summary+Summary2,U:Summary+Summary2{ [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/rust0008_generics.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | fn test_trait_params_end (t:T,u:U) ->String where T:Summary+Summary2,U:Summary+Summary2{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `itemVar2` [INFO] [stdout] --> src/rust0009_io.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let itemVar2 :Vec = env::args_os().collect(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_itemVar2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arg2` [INFO] [stdout] --> src/rust0009_io.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let arg2 = &itemVar[1]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_arg2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/rust0009_io.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let mut p = &i[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `contents` [INFO] [stdout] --> src/rust0009_io.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let contents = fs::read_to_string("xx").expect("read file error"); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_contents` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> src/rust0010_bibao.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let num = 123; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0010_bibao.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let v = bItem(123); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0010_bibao.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let v = bItem(123); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bItem` [INFO] [stdout] --> src/rust0010_bibao.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let bItem = |param : i32|->i32{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_bItem` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0002_ownership.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut str = "str item"; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0002_ownership.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let mut j = &mut i; [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/rust0002_ownership.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let mut p = &mut i; [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/rust0002_ownership.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let mut str = String::from("test string"); [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/rust0003_struct_1.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let mut user_temp = test_02(String::from("kyssion@kys.net"),String::from("jetty")); [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/rust0003_struct_1.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let mut user = User{ [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/rust0003_struct_1.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let mut item_y = YStruct(12, String::from("test"), 1.2); [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/rust0004_enum_and_match.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let mut one = Some(12); [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/rust0006_collection.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut v = vec![1,2,3,4]; [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/rust0006_collection.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let mut s = 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/rust0006_collection.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut string1 = String::from("A"); [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/rust0006_collection.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let mut string2 = String::from("B"); [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/rust0006_collection.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let mut string3 = String::from("C"); [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/rust0006_collection.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut stringItem = String::from("AABBCCDDEEFF"); [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Penny` is named the same as one of the variants of the type `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ^^^^^ help: to match on the variant, qualify the path: `Coin::Penny` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bindings_with_variant_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Nickel` is named the same as one of the variants of the type `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ help: to match on the variant, qualify the path: `Coin::Nickel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Dime` is named the same as one of the variants of the type `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ help: to match on the variant, qualify the path: `Coin::Dime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 77 | Coin::Quarter(one,tow)=>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/rust0004_enum_and_match.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 81 | _ =>{ //todo 使用通配符_ 可以匹配其他未知情况 [INFO] [stdout] | ^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/main.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let p = &mut arr; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let z = arr[0]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value1` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let value1 = 10; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_value1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value1` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let value1 = "sdfsdf"; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_value1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `value2` is assigned to, but never used [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let mut value2 = 10; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_value2` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `value2` is never read [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | value2 = 11; // 可以进行修改 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let i: i8; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let i: i16; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let i: i32; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let i: i64; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let i: i128; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let i: usize; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let f:f32; [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/rust0001_var_and_control_flow.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let f:f64; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let b:bool = false; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let b : bool = true; [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/rust0001_var_and_control_flow.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let c : char = '总'; [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/rust0001_var_and_control_flow.rs:43:10 [INFO] [stdout] | [INFO] [stdout] 43 | let (a,b,_) = y; // rust 这里和golang的处理方法类似使用_ 来丢弃不用的值 [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/rust0001_var_and_control_flow.rs:43:12 [INFO] [stdout] | [INFO] [stdout] 43 | let (a,b,_) = y; // rust 这里和golang的处理方法类似使用_ 来丢弃不用的值 [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/rust0001_var_and_control_flow.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let c = y.1;// 元组可以使用的后缀+ 数字来确定标记位置 [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/rust0001_var_and_control_flow.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let a = [1,2,3,4,5,6]; // 数组初始化 [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/rust0001_var_and_control_flow.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let b : [i32; 10]; // 初始化声明数组 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let str = "&str"; // 这个是字符串字面量,不能进行修改 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | let str = String::from("String"); //堆分配字符串 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let i = 123;// 赋值语句是语句不是表达式 所以不能想其他语言一样使用 a=b=12 这种方法赋值 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let i = if(i>3){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:78:9 [INFO] [stdout] | [INFO] [stdout] 78 | let item = loop{ [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:84:18 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn func_test(i : i32)-> String{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | let a = if number<5{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | let item = loop{ [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0006_collection.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | let mut keys = vec!["key1","key2"]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | let a = while number<5 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0006_collection.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let mut values = vec!["value1","value1"]; [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/rust0006_collection.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | let mut valueOption = my_hash_map.get("key"); [INFO] [stdout] | ----^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/rust0000_official_example.rs:40:15 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn notify(item: impl Summary){} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0002_ownership.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut str = "str item"; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/rust0002_ownership.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let j = i; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0002_ownership.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let v = j.clone();//使用clone 可以获取一个string字符串的clone [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/rust0002_ownership.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let s = test_fn(s);// 此时S已经没有任何作用域的信息 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/rust0002_ownership.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let z = &i; // 获取这个值的引用 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/rust0002_ownership.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let j = &mut i; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `itemStr` [INFO] [stdout] --> src/rust0002_ownership.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let itemStr = &str[0..1]; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_itemStr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user` [INFO] [stdout] --> src/rust0003_struct_1.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let mut user = User{ [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_user` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0003_struct_1.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | let i = item_y.0; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `area` [INFO] [stdout] --> src/rust0003_struct_1.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | let area = area(&rect1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_area` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `area` [INFO] [stdout] --> src/rust0003_struct_2.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let area = area(&rect1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_area` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/rust0003_struct_2.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let p =Rectangle::square(12); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let four = IpAddrKind::V4; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let six = IpAddrKind::V6; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tow` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let tow = Some("sdfsdf"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_tow` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `sss` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let sss = one.expect("ddd"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_sss` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ip_type` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 53 | fn route(ip_type: IpAddrKind){ [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_ip_type` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Penny` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_Penny` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Nickel` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_Nickel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Dime` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_Dime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0006_collection.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut v = vec![1,2,3,4]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0006_collection.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let i = &v[1]; // 这个会有越界 问题 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/rust0006_collection.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let i = v.get(1); // 这个不会有 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/rust0006_collection.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let row = vec![SpreadsheetCell::Int(3),SpreadsheetCell::Float(5.4),SpreadsheetCell::Text(String::from("ffff"))]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/rust0006_collection.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let mut s = String::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0006_collection.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let str = str.to_string();//todo 如果是实现了 display trait 类型的话,就可以调用to_string 方法来获取进行序列化的之后的值 ... [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0006_collection.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let str = "this is a str".to_string(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `str` [INFO] [stdout] --> src/rust0006_collection.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | let str = String::from("this is a str"); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `stringItem` [INFO] [stdout] --> src/rust0006_collection.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut stringItem = String::from("AABBCCDDEEFF"); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_stringItem` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `my_hash_map` [INFO] [stdout] --> src/rust0006_collection.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | let my_hash_map :HashMap<&&str,&&str> = keys.iter().zip(values.iter()).collect(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_hash_map` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key` [INFO] [stdout] --> src/rust0006_collection.rs:104:10 [INFO] [stdout] | [INFO] [stdout] 104 | for (key,value) in &my_hash_map{ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/rust0006_collection.rs:104:14 [INFO] [stdout] | [INFO] [stdout] 104 | for (key,value) in &my_hash_map{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value_str` [INFO] [stdout] --> src/rust0006_collection.rs:110:13 [INFO] [stdout] | [INFO] [stdout] 110 | let value_str = my_hash_map.entry(str).or_insert(0); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_value_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `error` [INFO] [stdout] --> src/rust0007_error.rs:33:56 [INFO] [stdout] | [INFO] [stdout] 33 | File::create("hello.txxt").unwrap_or_else(|error|{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_error` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/rust0007_error.rs:24:21 [INFO] [stdout] | [INFO] [stdout] 24 | Err(e) => panic!("error") [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0009_io.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let mut arg1 = &mut itemVar[0]; [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `other_error` [INFO] [stdout] --> src/rust0007_error.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | other_error => panic!("other error") [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_other_error` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/rust0007_error.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let f = File::open("ffff").map_err(|error|{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0009_io.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let mut p = &i[0]; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/rust0007_error.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | let f = File::open("fff").expect("this is 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/rust0007_error.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let f = File::open("fff").unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/rust0008_generics.rs:85:22 [INFO] [stdout] | [INFO] [stdout] 85 | fn test_trait_params(t : impl Summary+Summary2){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/rust0008_generics.rs:89:48 [INFO] [stdout] | [INFO] [stdout] 89 | fn test_trait_params_up (t: T,p:T){ //todo 注意这里,这里使用了范型,那么,rust会强制要求t.p 大类型相同,而不是都实现 ... [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/rust0008_generics.rs:89:53 [INFO] [stdout] | [INFO] [stdout] 89 | fn test_trait_params_up (t: T,p:T){ //todo 注意这里,这里使用了范型,那么,rust会强制要求t.p 大类型相同,而不是都实现 ... [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/rust0008_generics.rs:95:33 [INFO] [stdout] | [INFO] [stdout] 95 | fn test_trait_params_end (t:T,u:U) ->String where T:Summary+Summary2,U:Summary+Summary2{ [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/rust0008_generics.rs:95:37 [INFO] [stdout] | [INFO] [stdout] 95 | fn test_trait_params_end (t:T,u:U) ->String where T:Summary+Summary2,U:Summary+Summary2{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `itemVar2` [INFO] [stdout] --> src/rust0009_io.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let itemVar2 :Vec = env::args_os().collect(); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_itemVar2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arg2` [INFO] [stdout] --> src/rust0009_io.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let arg2 = &itemVar[1]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_arg2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/rust0009_io.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let mut p = &i[0]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `contents` [INFO] [stdout] --> src/rust0009_io.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let contents = fs::read_to_string("xx").expect("read file error"); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_contents` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn test1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> src/rust0010_bibao.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let num = 123; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `MAX_LENGTH` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | const MAX_LENGTH: i32 = 1000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `data_type` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn data_type() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0010_bibao.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let v = bItem(123); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `statement_and_expression` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn statement_and_expression(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/rust0010_bibao.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let v = bItem(123); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `func_test` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn func_test(i : i32)-> String{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bItem` [INFO] [stdout] --> src/rust0010_bibao.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let bItem = |param : i32|->i32{ [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_bItem` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `process_test` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:90:8 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn process_test(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0000_official_example.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn test1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `notify` [INFO] [stdout] --> src/rust0000_official_example.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn notify(item: impl Summary){} [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `ownership_main` [INFO] [stdout] --> src/rust0002_ownership.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn ownership_main(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_main` [INFO] [stdout] --> src/rust0002_ownership.rs:67:4 [INFO] [stdout] | [INFO] [stdout] 67 | fn test_main() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test3_fn` [INFO] [stdout] --> src/rust0002_ownership.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | pub fn test3_fn(s:&String) -> &str{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn` [INFO] [stdout] --> src/rust0002_ownership.rs:86:8 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn test_fn(s:String)-> String{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test2_fn` [INFO] [stdout] --> src/rust0002_ownership.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn test2_fn(s: &String)->usize{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `User` [INFO] [stdout] --> src/rust0003_struct_1.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct User{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `YStruct` [INFO] [stdout] --> src/rust0003_struct_1.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct YStruct(i32, String, f64); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `YStructEmpty` [INFO] [stdout] --> src/rust0003_struct_1.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct YStructEmpty(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_01` [INFO] [stdout] --> src/rust0003_struct_1.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn test_01(){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_02` [INFO] [stdout] --> src/rust0003_struct_1.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn test_02(email : String,user_name:String)-> User{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area` [INFO] [stdout] --> src/rust0003_struct_1.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn area(rectangle: &Rectangle)->u32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `example` [INFO] [stdout] --> src/rust0003_struct_1.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn example(){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `area` [INFO] [stdout] --> src/rust0003_struct_2.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | fn area(&self)->u32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_with` [INFO] [stdout] --> src/rust0003_struct_2.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | fn add_with(&mut self,i:u32){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `can_hold` [INFO] [stdout] --> src/rust0003_struct_2.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | fn can_hold(&self,other : &Rectangle)->bool{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `square` [INFO] [stdout] --> src/rust0003_struct_2.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn square(size: u32)->Rectangle{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area` [INFO] [stdout] --> src/rust0003_struct_2.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn area(rectangle: &Rectangle)->u32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `example` [INFO] [stdout] --> src/rust0003_struct_2.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn example(){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `IpAddrKind` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:9:6 [INFO] [stdout] | [INFO] [stdout] 9 | enum IpAddrKind{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `TestStruct` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct TestStruct{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `TestEnum` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | enum TestEnum{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test2` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn test2(test :TestEnum){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn test1(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `route` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn route(ip_type: IpAddrKind){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:61:10 [INFO] [stdout] | [INFO] [stdout] 61 | pub enum Coin{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_match` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn test_match (item : Coin) -> i32{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_match_3` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:88:8 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn test_match_3(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_wait_list` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn add_to_wait_list(){} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `seat_at_table` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | fn seat_at_table(){} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `take_order` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | fn take_order() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `server_order` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | fn server_order() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn eat_at_restaurant(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_wait_list` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn add_to_wait_list(){} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant2` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn eat_at_restaurant2(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:86:16 [INFO] [stdout] | [INFO] [stdout] 86 | fn test(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `gggg` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:95:19 [INFO] [stdout] | [INFO] [stdout] 95 | pub fn gggg(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `gggg` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn gggg(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `vec_test` [INFO] [stdout] --> src/rust0006_collection.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn vec_test(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_string` [INFO] [stdout] --> src/rust0006_collection.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn test_string(){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_hash_map` [INFO] [stdout] --> src/rust0006_collection.rs:83:4 [INFO] [stdout] | [INFO] [stdout] 83 | fn test_hash_map(){ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_panic` [INFO] [stdout] --> src/rust0007_error.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn test_panic(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_result` [INFO] [stdout] --> src/rust0007_error.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn test_result() -> Result{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Point` [INFO] [stdout] --> src/rust0008_generics.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Point{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `test` [INFO] [stdout] --> src/rust0008_generics.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | fn test(&mut self) ->&T{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `TestEnum` [INFO] [stdout] --> src/rust0008_generics.rs:23:6 [INFO] [stdout] | [INFO] [stdout] 23 | enum TestEnum{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_generics` [INFO] [stdout] --> src/rust0008_generics.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn test_generics(){ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_params` [INFO] [stdout] --> src/rust0008_generics.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn test_trait_params(t : impl Summary+Summary2){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_params_up` [INFO] [stdout] --> src/rust0008_generics.rs:89:4 [INFO] [stdout] | [INFO] [stdout] 89 | fn test_trait_params_up (t: T,p:T){ //todo 注意这里,这里使用了范型,那么,rust会强制要求t.p 大类型相同,而不是都实现 ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_params_end` [INFO] [stdout] --> src/rust0008_generics.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn test_trait_params_end (t:T,u:U) ->String where T:Summary+Summary2,U:Summary+Summary2{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_reture` [INFO] [stdout] --> src/rust0008_generics.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn test_trait_reture()->impl Summary{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Pair` [INFO] [stdout] --> src/rust0008_generics.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | struct Pair{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/rust0008_generics.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | fn new(x:T,y:T)->Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `cmp_display` [INFO] [stdout] --> src/rust0008_generics.rs:122:8 [INFO] [stdout] | [INFO] [stdout] 122 | fn cmp_display(&self){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `lift_test` [INFO] [stdout] --> src/rust0008_generics.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | fn lift_test<'a>(x:&'a str,y :&'a str)-> &'a str{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `ImportantExcerpt` [INFO] [stdout] --> src/rust0008_generics.rs:155:8 [INFO] [stdout] | [INFO] [stdout] 155 | struct ImportantExcerpt<'a,'b>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_item` [INFO] [stdout] --> src/rust0009_io.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn test_item(){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `simulated_expensive_calculation` [INFO] [stdout] --> src/rust0010_bibao.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn simulated_expensive_calculation(intensity:i32) -> i32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0010_bibao.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn test1(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Cache` [INFO] [stdout] --> src/rust0010_bibao.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Cache where T:Fn(u32)->u32{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/rust0010_bibao.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | fn new(ca :T) ->Cache{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `value` [INFO] [stdout] --> src/rust0010_bibao.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | fn value(&mut self , arg:u32)->u32{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_main_1` [INFO] [stdout] --> src/main.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn test_trait_main_1 (a:T,b:T){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_main_2` [INFO] [stdout] --> src/main.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn test_trait_main_2(a : impl SummaryItem,b:impl SummaryItem){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `itemStr` should have a snake case name [INFO] [stdout] --> src/rust0002_ownership.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let itemStr = &str[0..1]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `item_str` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `itemStr` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | itemStr:String [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `item_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Penny` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `penny` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Nickel` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `nickel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Dime` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `dime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `stringVal1` should have a snake case name [INFO] [stdout] --> src/rust0006_collection.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | let mut stringVal1 = String::from("sdfsdf"); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `string_val1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `add` that must be used [INFO] [stdout] --> src/rust0006_collection.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | String::from("ffff").add("ffff");//todo add函数将会吧当前函数的所有权传入并且在上层进行修改,所以调用add的方法将会失效 ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `stringItem` should have a snake case name [INFO] [stdout] --> src/rust0006_collection.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | let mut stringItem = String::from("AABBCCDDEEFF"); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `string_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `valueOption` should have a snake case name [INFO] [stdout] --> src/rust0006_collection.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | let mut valueOption = my_hash_map.get("key"); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `value_option` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/rust0007_error.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | File::open("hello.txt")?.read_to_string(&mut str); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `itemVar` should have a snake case name [INFO] [stdout] --> src/rust0009_io.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut itemVar:Vec = env::args().collect(); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `item_var` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `itemVar2` should have a snake case name [INFO] [stdout] --> src/rust0009_io.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let itemVar2 :Vec = env::args_os().collect(); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `item_var2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `bItem` should have a snake case name [INFO] [stdout] --> src/rust0010_bibao.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let bItem = |params|{ [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `b_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `bItem` should have a snake case name [INFO] [stdout] --> src/rust0010_bibao.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let bItem = |params|params;// 简化写法 [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `b_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `bItem` should have a snake case name [INFO] [stdout] --> src/rust0010_bibao.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let bItem = |param : i32|->i32{ [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `b_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0002_ownership.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let mut str = "str item"; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/rust0002_ownership.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let mut j = &mut i; [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/rust0002_ownership.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let mut p = &mut i; [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/rust0002_ownership.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let mut str = String::from("test string"); [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/rust0003_struct_1.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let mut user_temp = test_02(String::from("kyssion@kys.net"),String::from("jetty")); [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/rust0003_struct_1.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let mut user = User{ [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/rust0003_struct_1.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let mut item_y = YStruct(12, String::from("test"), 1.2); [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/rust0004_enum_and_match.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let mut one = Some(12); [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/rust0006_collection.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut v = vec![1,2,3,4]; [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/rust0006_collection.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let mut s = 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/rust0006_collection.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let mut string1 = String::from("A"); [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/rust0006_collection.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let mut string2 = String::from("B"); [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/rust0006_collection.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let mut string3 = String::from("C"); [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/rust0006_collection.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut stringItem = String::from("AABBCCDDEEFF"); [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/rust0006_collection.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | let mut keys = vec!["key1","key2"]; [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/rust0006_collection.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let mut values = vec!["value1","value1"]; [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/rust0006_collection.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | let mut valueOption = my_hash_map.get("key"); [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/rust0009_io.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let mut arg1 = &mut itemVar[0]; [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/rust0009_io.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let mut p = &i[0]; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn test1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `MAX_LENGTH` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | const MAX_LENGTH: i32 = 1000; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `data_type` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn data_type() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `statement_and_expression` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:59:8 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn statement_and_expression(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `func_test` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:84:8 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn func_test(i : i32)-> String{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `process_test` [INFO] [stdout] --> src/rust0001_var_and_control_flow.rs:90:8 [INFO] [stdout] | [INFO] [stdout] 90 | pub fn process_test(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0000_official_example.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn test1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `notify` [INFO] [stdout] --> src/rust0000_official_example.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | pub fn notify(item: impl Summary){} [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `ownership_main` [INFO] [stdout] --> src/rust0002_ownership.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn ownership_main(){ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_main` [INFO] [stdout] --> src/rust0002_ownership.rs:67:4 [INFO] [stdout] | [INFO] [stdout] 67 | fn test_main() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test3_fn` [INFO] [stdout] --> src/rust0002_ownership.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | pub fn test3_fn(s:&String) -> &str{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_fn` [INFO] [stdout] --> src/rust0002_ownership.rs:86:8 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn test_fn(s:String)-> String{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test2_fn` [INFO] [stdout] --> src/rust0002_ownership.rs:91:8 [INFO] [stdout] | [INFO] [stdout] 91 | pub fn test2_fn(s: &String)->usize{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `User` [INFO] [stdout] --> src/rust0003_struct_1.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct User{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `YStruct` [INFO] [stdout] --> src/rust0003_struct_1.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct YStruct(i32, String, f64); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `YStructEmpty` [INFO] [stdout] --> src/rust0003_struct_1.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct YStructEmpty(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_01` [INFO] [stdout] --> src/rust0003_struct_1.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn test_01(){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_02` [INFO] [stdout] --> src/rust0003_struct_1.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn test_02(email : String,user_name:String)-> User{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area` [INFO] [stdout] --> src/rust0003_struct_1.rs:62:4 [INFO] [stdout] | [INFO] [stdout] 62 | fn area(rectangle: &Rectangle)->u32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `example` [INFO] [stdout] --> src/rust0003_struct_1.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn example(){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `area` [INFO] [stdout] --> src/rust0003_struct_2.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | fn area(&self)->u32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_with` [INFO] [stdout] --> src/rust0003_struct_2.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | fn add_with(&mut self,i:u32){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `can_hold` [INFO] [stdout] --> src/rust0003_struct_2.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | fn can_hold(&self,other : &Rectangle)->bool{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `square` [INFO] [stdout] --> src/rust0003_struct_2.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn square(size: u32)->Rectangle{ [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area` [INFO] [stdout] --> src/rust0003_struct_2.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn area(rectangle: &Rectangle)->u32{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `example` [INFO] [stdout] --> src/rust0003_struct_2.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn example(){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `IpAddrKind` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:9:6 [INFO] [stdout] | [INFO] [stdout] 9 | enum IpAddrKind{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `TestStruct` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | struct TestStruct{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `TestEnum` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:21:6 [INFO] [stdout] | [INFO] [stdout] 21 | enum TestEnum{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test2` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn test2(test :TestEnum){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn test1(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `route` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn route(ip_type: IpAddrKind){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Coin` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:61:10 [INFO] [stdout] | [INFO] [stdout] 61 | pub enum Coin{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_match` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:67:8 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn test_match (item : Coin) -> i32{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_match_3` [INFO] [stdout] --> src/rust0004_enum_and_match.rs:88:8 [INFO] [stdout] | [INFO] [stdout] 88 | pub fn test_match_3(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_wait_list` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn add_to_wait_list(){} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `seat_at_table` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | fn seat_at_table(){} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `take_order` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 20 | fn take_order() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `server_order` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | fn server_order() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn eat_at_restaurant(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_wait_list` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | pub fn add_to_wait_list(){} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant2` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:58:8 [INFO] [stdout] | [INFO] [stdout] 58 | pub fn eat_at_restaurant2(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:86:16 [INFO] [stdout] | [INFO] [stdout] 86 | fn test(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `gggg` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:95:19 [INFO] [stdout] | [INFO] [stdout] 95 | pub fn gggg(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `gggg` [INFO] [stdout] --> src/rust0005_pakage_module_other.rs:100:20 [INFO] [stdout] | [INFO] [stdout] 100 | pub fn gggg(){ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `vec_test` [INFO] [stdout] --> src/rust0006_collection.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn vec_test(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_string` [INFO] [stdout] --> src/rust0006_collection.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn test_string(){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_hash_map` [INFO] [stdout] --> src/rust0006_collection.rs:83:4 [INFO] [stdout] | [INFO] [stdout] 83 | fn test_hash_map(){ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_panic` [INFO] [stdout] --> src/rust0007_error.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn test_panic(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_result` [INFO] [stdout] --> src/rust0007_error.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn test_result() -> Result{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Point` [INFO] [stdout] --> src/rust0008_generics.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct Point{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `test` [INFO] [stdout] --> src/rust0008_generics.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | fn test(&mut self) ->&T{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `TestEnum` [INFO] [stdout] --> src/rust0008_generics.rs:23:6 [INFO] [stdout] | [INFO] [stdout] 23 | enum TestEnum{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_generics` [INFO] [stdout] --> src/rust0008_generics.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn test_generics(){ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_params` [INFO] [stdout] --> src/rust0008_generics.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn test_trait_params(t : impl Summary+Summary2){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_params_up` [INFO] [stdout] --> src/rust0008_generics.rs:89:4 [INFO] [stdout] | [INFO] [stdout] 89 | fn test_trait_params_up (t: T,p:T){ //todo 注意这里,这里使用了范型,那么,rust会强制要求t.p 大类型相同,而不是都实现 ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_params_end` [INFO] [stdout] --> src/rust0008_generics.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn test_trait_params_end (t:T,u:U) ->String where T:Summary+Summary2,U:Summary+Summary2{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_reture` [INFO] [stdout] --> src/rust0008_generics.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn test_trait_reture()->impl Summary{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Pair` [INFO] [stdout] --> src/rust0008_generics.rs:108:8 [INFO] [stdout] | [INFO] [stdout] 108 | struct Pair{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/rust0008_generics.rs:113:8 [INFO] [stdout] | [INFO] [stdout] 113 | fn new(x:T,y:T)->Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `cmp_display` [INFO] [stdout] --> src/rust0008_generics.rs:122:8 [INFO] [stdout] | [INFO] [stdout] 122 | fn cmp_display(&self){ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `lift_test` [INFO] [stdout] --> src/rust0008_generics.rs:145:5 [INFO] [stdout] | [INFO] [stdout] 145 | fn lift_test<'a>(x:&'a str,y :&'a str)-> &'a str{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `ImportantExcerpt` [INFO] [stdout] --> src/rust0008_generics.rs:155:8 [INFO] [stdout] | [INFO] [stdout] 155 | struct ImportantExcerpt<'a,'b>{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_item` [INFO] [stdout] --> src/rust0009_io.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | fn test_item(){ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `simulated_expensive_calculation` [INFO] [stdout] --> src/rust0010_bibao.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn simulated_expensive_calculation(intensity:i32) -> i32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test1` [INFO] [stdout] --> src/rust0010_bibao.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn test1(){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Cache` [INFO] [stdout] --> src/rust0010_bibao.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Cache where T:Fn(u32)->u32{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/rust0010_bibao.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | fn new(ca :T) ->Cache{ [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `value` [INFO] [stdout] --> src/rust0010_bibao.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | fn value(&mut self , arg:u32)->u32{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_main_1` [INFO] [stdout] --> src/main.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | fn test_trait_main_1 (a:T,b:T){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_trait_main_2` [INFO] [stdout] --> src/main.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn test_trait_main_2(a : impl SummaryItem,b:impl SummaryItem){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `itemStr` should have a snake case name [INFO] [stdout] --> src/rust0002_ownership.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let itemStr = &str[0..1]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `item_str` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `itemStr` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | itemStr:String [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `item_str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Penny` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | Penny => { //支持括号模式 [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `penny` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Nickel` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 75 | Nickel=>12, [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `nickel` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Dime` should have a snake case name [INFO] [stdout] --> src/rust0004_enum_and_match.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | Dime=>33, [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `dime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `stringVal1` should have a snake case name [INFO] [stdout] --> src/rust0006_collection.rs:49:13 [INFO] [stdout] | [INFO] [stdout] 49 | let mut stringVal1 = String::from("sdfsdf"); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `string_val1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused return value of `add` that must be used [INFO] [stdout] --> src/rust0006_collection.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | String::from("ffff").add("ffff");//todo add函数将会吧当前函数的所有权传入并且在上层进行修改,所以调用add的方法将会失效 ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `stringItem` should have a snake case name [INFO] [stdout] --> src/rust0006_collection.rs:63:13 [INFO] [stdout] | [INFO] [stdout] 63 | let mut stringItem = String::from("AABBCCDDEEFF"); [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `string_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `valueOption` should have a snake case name [INFO] [stdout] --> src/rust0006_collection.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | let mut valueOption = my_hash_map.get("key"); [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case: `value_option` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/rust0007_error.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | File::open("hello.txt")?.read_to_string(&mut str); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `itemVar` should have a snake case name [INFO] [stdout] --> src/rust0009_io.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let mut itemVar:Vec = env::args().collect(); [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case: `item_var` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `itemVar2` should have a snake case name [INFO] [stdout] --> src/rust0009_io.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let itemVar2 :Vec = env::args_os().collect(); [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to snake case: `item_var2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `bItem` should have a snake case name [INFO] [stdout] --> src/rust0010_bibao.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let bItem = |params|{ [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `b_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `bItem` should have a snake case name [INFO] [stdout] --> src/rust0010_bibao.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let bItem = |params|params;// 简化写法 [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `b_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `bItem` should have a snake case name [INFO] [stdout] --> src/rust0010_bibao.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let bItem = |param : i32|->i32{ [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case: `b_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 219 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0170`. [INFO] [stdout] [INFO] [stdout] warning: 219 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0170`. [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.51s [INFO] running `Command { std: "docker" "inspect" "1d57b83af382dbc933dadae9dfd42f6d543b4697a7f85aeb912981ee1f42d3e0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1d57b83af382dbc933dadae9dfd42f6d543b4697a7f85aeb912981ee1f42d3e0", kill_on_drop: false }` [INFO] [stdout] 1d57b83af382dbc933dadae9dfd42f6d543b4697a7f85aeb912981ee1f42d3e0