[INFO] cloning repository https://github.com/helloyzp/RustProject [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/helloyzp/RustProject" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhelloyzp%2FRustProject", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhelloyzp%2FRustProject'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5f3dad0cec49d4ea285a09193b6711a53254ea88 [INFO] checking helloyzp/RustProject against try#3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f for pr-87248 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhelloyzp%2FRustProject" "/workspace/builds/worker-5/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/helloyzp/RustProject on toolchain 3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/helloyzp/RustProject [INFO] finished tweaking git repo https://github.com/helloyzp/RustProject [INFO] tweaked toml for git repo https://github.com/helloyzp/RustProject written to /workspace/builds/worker-5/source/Cargo.toml [INFO] crate git repo https://github.com/helloyzp/RustProject already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e94679f72bc582663e36cebef005e05037b0f2a7780914241e3e8ead4e44f3be [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" "e94679f72bc582663e36cebef005e05037b0f2a7780914241e3e8ead4e44f3be", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e94679f72bc582663e36cebef005e05037b0f2a7780914241e3e8ead4e44f3be", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e94679f72bc582663e36cebef005e05037b0f2a7780914241e3e8ead4e44f3be", kill_on_drop: false }` [INFO] [stdout] e94679f72bc582663e36cebef005e05037b0f2a7780914241e3e8ead4e44f3be [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/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" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] aafee5acc1ad1b79de8dd5dad3a2a7a217f921adbbab8ab33aeb8672613f54fe [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" "aafee5acc1ad1b79de8dd5dad3a2a7a217f921adbbab8ab33aeb8672613f54fe", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.98 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking RustProject v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::result::Result` [INFO] [stdout] --> src/bin/macro_demo.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition [INFO] [stdout] --> src/bin/macro_demo.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / macro_rules! print_hello { [INFO] [stdout] 12 | | ()=> { [INFO] [stdout] 13 | | println!("hello world!"); [INFO] [stdout] 14 | | } [INFO] [stdout] 15 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `hello::print_hello` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use hello::print_hello;//使用use引用hello这个模块下的print_hello()函数 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `printHello::hello2::print_hello2` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use printHello::hello2::print_hello2;//使用printHello这个模块的子模块hello2的print_hello2()函数 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Patterns_that_Bind_to_Values::UsState` [INFO] [stdout] --> src/ch06/enums.rs:188:96 [INFO] [stdout] | [INFO] [stdout] 188 | use crate::ch06::enums::{Patterns_that_Bind_to_Values, Patterns_that_Bind_to_Values::Coin, Patterns_that_Bind_to_Values::UsState}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::result::Result` [INFO] [stdout] --> src/bin/macro_demo.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `hello::print_hello` [INFO] [stdout] --> src/main.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use hello::print_hello;//使用use引用hello这个模块下的print_hello()函数 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `printHello::hello2::print_hello2` [INFO] [stdout] --> src/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use printHello::hello2::print_hello2;//使用printHello这个模块的子模块hello2的print_hello2()函数 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Patterns_that_Bind_to_Values::UsState` [INFO] [stdout] --> src/ch06/enums.rs:188:96 [INFO] [stdout] | [INFO] [stdout] 188 | use crate::ch06::enums::{Patterns_that_Bind_to_Values, Patterns_that_Bind_to_Values::Coin, Patterns_that_Bind_to_Values::UsState}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/ch03/basic_concepts.rs:52:10 [INFO] [stdout] | [INFO] [stdout] 52 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/ch03/basic_concepts.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/ch04/ownership.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/ch04/ownership.rs:128:11 [INFO] [stdout] | [INFO] [stdout] 128 | fn change(some_string: &String) { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch04/ownership.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut s = String::from("hello"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/ch04/ownership.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/ch04/ownership.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | let hello = "Hello, world!"; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/ch04/ownership.rs:252:9 [INFO] [stdout] | [INFO] [stdout] 252 | let hello: &'static str = "Hello, world!"; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/ch05/struct_demo.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/ch05/struct_demo.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/ch05/struct_demo.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let origin = Point(1, 2, 3); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rect` [INFO] [stdout] --> src/ch05/struct_demo.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let rect = Rectangle { width: 30, height: 50 }; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_rect` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/ch06/enums.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | 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/ch06/enums.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | 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: `ip_type` [INFO] [stdout] --> src/ch06/enums.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | 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: `home` [INFO] [stdout] --> src/ch06/enums.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let home = IpAddr { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/ch06/enums.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let loopback = IpAddr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/ch06/enums.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/ch06/enums.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | let some_string = Some("a string"); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/ch06/enums.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/ch06/enums.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/ch06/enums.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> src/ch06/enums.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/ch06/enums.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | _ => count += 1, [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: variable `count` is assigned to, but never used [INFO] [stdout] --> src/ch06/enums.rs:214:17 [INFO] [stdout] | [INFO] [stdout] 214 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/ch06/enums.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | count += 1; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch04/ownership.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | let mut s = String::from("hello"); [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/ch05/struct_demo.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let mut user1 = User { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_hello` [INFO] [stdout] --> src/hello.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn print_hello() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_hello2` [INFO] [stdout] --> src/printHello/hello2.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn print_hello2() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `sub_mod_hello` [INFO] [stdout] --> src/printHello/hello2.rs:15:19 [INFO] [stdout] | [INFO] [stdout] 15 | pub(crate) fn sub_mod_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `sub_mod2_print_hello` [INFO] [stdout] --> src/printHello/hello2.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn sub_mod2_print_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_hello3` [INFO] [stdout] --> src/printHello/hello3.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn print_hello3() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias is never used: `unsigned_64` [INFO] [stdout] --> src/common/type_demo.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | type unsigned_64 = u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `ConcreteError` [INFO] [stdout] --> src/common/type_demo.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | enum ConcreteError { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias is never used: `Result` [INFO] [stdout] --> src/common/type_demo.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | type Result = result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/common/type_demo.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `f` [INFO] [stdout] --> src/common/unittype.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn f() { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `f2` [INFO] [stdout] --> src/common/unittype.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn f2() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch03/basic_concepts.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `variable` [INFO] [stdout] --> src/ch03/basic_concepts.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn variable() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `variable2` [INFO] [stdout] --> src/ch03/basic_concepts.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn variable2() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `shadow` [INFO] [stdout] --> src/ch03/basic_concepts.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn shadow() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `tupleDemo` [INFO] [stdout] --> src/ch03/basic_concepts.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn tupleDemo() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `another_function` [INFO] [stdout] --> src/ch03/basic_concepts.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn another_function(x: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `five` [INFO] [stdout] --> src/ch03/basic_concepts.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn five() -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `loop_break` [INFO] [stdout] --> src/ch03/basic_concepts.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | fn loop_break() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_while` [INFO] [stdout] --> src/ch03/basic_concepts.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn test_while() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_for` [INFO] [stdout] --> src/ch03/basic_concepts.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn test_for() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch04/ownership.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_move` [INFO] [stdout] --> src/ch04/ownership.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn test_move() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_OwnershipandFunctions` [INFO] [stdout] --> src/ch04/ownership.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn test_OwnershipandFunctions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `takes_ownership` [INFO] [stdout] --> src/ch04/ownership.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn takes_ownership(some_string: String) { // some_string 进入作用域 [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `makes_copy` [INFO] [stdout] --> src/ch04/ownership.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn makes_copy(some_integer: i32) { // some_integer 进入作用域 [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_ReturnValuesAndScope` [INFO] [stdout] --> src/ch04/ownership.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn test_ReturnValuesAndScope() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/ch03/basic_concepts.rs:52:10 [INFO] [stdout] | [INFO] [stdout] 52 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/ch03/basic_concepts.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | let (x, y, z) = tup; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/ch04/ownership.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/ch04/ownership.rs:128:11 [INFO] [stdout] | [INFO] [stdout] 128 | fn change(some_string: &String) { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/ch04/ownership.rs:158:13 [INFO] [stdout] | [INFO] [stdout] 158 | let mut s = String::from("hello"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/ch04/ownership.rs:175:13 [INFO] [stdout] | [INFO] [stdout] 175 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/ch04/ownership.rs:249:9 [INFO] [stdout] | [INFO] [stdout] 249 | let hello = "Hello, world!"; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/ch04/ownership.rs:252:9 [INFO] [stdout] | [INFO] [stdout] 252 | let hello: &'static str = "Hello, world!"; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/ch05/struct_demo.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user2` [INFO] [stdout] --> src/ch05/struct_demo.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let user2 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/ch05/struct_demo.rs:92:9 [INFO] [stdout] | [INFO] [stdout] 92 | let origin = Point(1, 2, 3); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `gives_ownership` [INFO] [stdout] --> src/ch04/ownership.rs:81:4 [INFO] [stdout] | [INFO] [stdout] 81 | fn gives_ownership() -> String { // gives_ownership 将返回值移动给调用它的函数 [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `takes_and_gives_back` [INFO] [stdout] --> src/ch04/ownership.rs:89:4 [INFO] [stdout] | [INFO] [stdout] 89 | fn takes_and_gives_back(a_string: String) -> String { // a_string 进入作用域 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_touple` [INFO] [stdout] --> src/ch04/ownership.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn test_touple() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_length` [INFO] [stdout] --> src/ch04/ownership.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn calculate_length(s: String) -> (String, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_borrowing` [INFO] [stdout] --> src/ch04/ownership.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn test_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `change` [INFO] [stdout] --> src/ch04/ownership.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn change(some_string: &String) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_mutable_borrowing` [INFO] [stdout] --> src/ch04/ownership.rs:137:4 [INFO] [stdout] | [INFO] [stdout] 137 | fn test_mutable_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `change2` [INFO] [stdout] --> src/ch04/ownership.rs:146:4 [INFO] [stdout] | [INFO] [stdout] 146 | fn change2(some_string: &mut String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_multi_mutable_borrowing` [INFO] [stdout] --> src/ch04/ownership.rs:157:4 [INFO] [stdout] | [INFO] [stdout] 157 | fn test_multi_mutable_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_multi_mutable_borrowing2` [INFO] [stdout] --> src/ch04/ownership.rs:170:4 [INFO] [stdout] | [INFO] [stdout] 170 | fn test_multi_mutable_borrowing2() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_find_first_word` [INFO] [stdout] --> src/ch04/ownership.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn test_find_first_word() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `first_word` [INFO] [stdout] --> src/ch04/ownership.rs:203:4 [INFO] [stdout] | [INFO] [stdout] 203 | fn first_word(s: &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_find_first_word_use_slice` [INFO] [stdout] --> src/ch04/ownership.rs:215:4 [INFO] [stdout] | [INFO] [stdout] 215 | fn test_find_first_word_use_slice() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `first_word2` [INFO] [stdout] --> src/ch04/ownership.rs:234:4 [INFO] [stdout] | [INFO] [stdout] 234 | fn first_word2(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_slice` [INFO] [stdout] --> src/ch04/ownership.rs:247:4 [INFO] [stdout] | [INFO] [stdout] 247 | fn test_slice() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `User` [INFO] [stdout] --> src/ch05/struct_demo.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch05/struct_demo.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | pub(crate) fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `define_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn define_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `build_user` [INFO] [stdout] --> src/ch05/struct_demo.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `build_user2` [INFO] [stdout] --> src/ch05/struct_demo.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn build_user2(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `update_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn update_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `tuple_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn tuple_struct() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `unit_like_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn unit_like_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_rectangle_area` [INFO] [stdout] --> src/ch05/struct_demo.rs:107:4 [INFO] [stdout] | [INFO] [stdout] 107 | fn calculate_rectangle_area() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area` [INFO] [stdout] --> src/ch05/struct_demo.rs:117:4 [INFO] [stdout] | [INFO] [stdout] 117 | fn area(width: u32, height: u32) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_rectangle_area2` [INFO] [stdout] --> src/ch05/struct_demo.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn calculate_rectangle_area2() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area2` [INFO] [stdout] --> src/ch05/struct_demo.rs:131:4 [INFO] [stdout] | [INFO] [stdout] 131 | fn area2(dimensions: (u32, u32 )) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_rectangle_area3` [INFO] [stdout] --> src/ch05/struct_demo.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn calculate_rectangle_area3() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area3` [INFO] [stdout] --> src/ch05/struct_demo.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn area3(rectangle: &Rectangle) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `printRect` [INFO] [stdout] --> src/ch05/struct_demo.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | fn printRect() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `printRect2` [INFO] [stdout] --> src/ch05/struct_demo.rs:162:4 [INFO] [stdout] | [INFO] [stdout] 162 | fn printRect2() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `area` [INFO] [stdout] --> src/ch05/struct_demo.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | fn area(&self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `can_hold` [INFO] [stdout] --> src/ch05/struct_demo.rs:178:8 [INFO] [stdout] | [INFO] [stdout] 178 | 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/ch05/struct_demo.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | fn square(size: u32) -> Rectangle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_method_syntax` [INFO] [stdout] --> src/ch05/struct_demo.rs:189:4 [INFO] [stdout] | [INFO] [stdout] 189 | fn test_method_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_associated_functions` [INFO] [stdout] --> src/ch05/struct_demo.rs:206:4 [INFO] [stdout] | [INFO] [stdout] 206 | fn test_associated_functions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `IpAddr` [INFO] [stdout] --> src/ch06/enums.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | struct IpAddr { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `use_ip_addr` [INFO] [stdout] --> src/ch06/enums.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn use_ip_addr() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Message` [INFO] [stdout] --> src/ch06/enums.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Message { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `QuitMessage` [INFO] [stdout] --> src/ch06/enums.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | struct QuitMessage; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `MoveMessage` [INFO] [stdout] --> src/ch06/enums.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | struct MoveMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `WriteMessage` [INFO] [stdout] --> src/ch06/enums.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct WriteMessage(String); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rect` [INFO] [stdout] --> src/ch05/struct_demo.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let rect = Rectangle { width: 30, height: 50 }; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_rect` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `ChangeColorMessage` [INFO] [stdout] --> src/ch06/enums.rs:65:8 [INFO] [stdout] | [INFO] [stdout] 65 | struct ChangeColorMessage(i32, i32, i32); // 元组结构体 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `call` [INFO] [stdout] --> src/ch06/enums.rs:71:8 [INFO] [stdout] | [INFO] [stdout] 71 | fn call(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_enum_method` [INFO] [stdout] --> src/ch06/enums.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn test_enum_method() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_Option` [INFO] [stdout] --> src/ch06/enums.rs:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | fn test_Option() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Coin` [INFO] [stdout] --> src/ch06/enums.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `value_in_cents` [INFO] [stdout] --> src/ch06/enums.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `value_in_cents2` [INFO] [stdout] --> src/ch06/enums.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn value_in_cents2(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/ch06/enums.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | 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/ch06/enums.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | 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: `ip_type` [INFO] [stdout] --> src/ch06/enums.rs:25:10 [INFO] [stdout] | [INFO] [stdout] 25 | 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: `home` [INFO] [stdout] --> src/ch06/enums.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | let home = IpAddr { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/ch06/enums.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let loopback = IpAddr { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/ch06/enums.rs:85:9 [INFO] [stdout] | [INFO] [stdout] 85 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/ch06/enums.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | let some_string = Some("a string"); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/ch06/enums.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/ch06/enums.rs:167:13 [INFO] [stdout] | [INFO] [stdout] 167 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/ch06/enums.rs:168:13 [INFO] [stdout] | [INFO] [stdout] 168 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> src/ch06/enums.rs:206:17 [INFO] [stdout] | [INFO] [stdout] 206 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/ch06/enums.rs:209:18 [INFO] [stdout] | [INFO] [stdout] 209 | _ => count += 1, [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: variable `count` is assigned to, but never used [INFO] [stdout] --> src/ch06/enums.rs:214:17 [INFO] [stdout] | [INFO] [stdout] 214 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> src/ch06/enums.rs:218:13 [INFO] [stdout] | [INFO] [stdout] 218 | count += 1; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/ch10/generic_trait.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Alabama` [INFO] [stdout] --> src/ch06/enums.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | Alabama, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `float` [INFO] [stdout] --> src/ch10/generic_trait.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Alaska` [INFO] [stdout] --> src/ch06/enums.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | Alaska, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Coin` [INFO] [stdout] --> src/ch06/enums.rs:130:21 [INFO] [stdout] | [INFO] [stdout] 130 | pub(crate) enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `value_in_cents` [INFO] [stdout] --> src/ch06/enums.rs:138:8 [INFO] [stdout] | [INFO] [stdout] 138 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_integer` [INFO] [stdout] --> src/ch10/generic_trait.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | let both_integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `plus_one` [INFO] [stdout] --> src/ch06/enums.rs:158:8 [INFO] [stdout] | [INFO] [stdout] 158 | fn plus_one(x: Option) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 165 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:174:8 [INFO] [stdout] | [INFO] [stdout] 174 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `both_float` [INFO] [stdout] --> src/ch10/generic_trait.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | let both_float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_both_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:190:8 [INFO] [stdout] | [INFO] [stdout] 190 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_if_let` [INFO] [stdout] --> src/ch06/enums.rs:198:8 [INFO] [stdout] | [INFO] [stdout] 198 | fn test_if_let() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer_and_float` [INFO] [stdout] --> src/ch10/generic_trait.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | let integer_and_float = Point { x: 5, y: 4.0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer_and_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_coin1` [INFO] [stdout] --> src/ch06/enums.rs:205:8 [INFO] [stdout] | [INFO] [stdout] 205 | fn test_coin1(coin: Patterns_that_Bind_to_Values::Coin) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_coin2` [INFO] [stdout] --> src/ch06/enums.rs:213:19 [INFO] [stdout] | [INFO] [stdout] 213 | pub(crate) fn test_coin2(coin: Coin) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_waitlist` [INFO] [stdout] --> src/ch07/package_crate_module.rs:4:16 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant` [INFO] [stdout] --> src/ch07/package_crate_module.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_waitlist` [INFO] [stdout] --> src/ch07/mod_separate/lib/front_of_house.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant` [INFO] [stdout] --> src/ch07/mod_separate/lib.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch10/generic_trait.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `function1` [INFO] [stdout] --> src/ch10/generic_trait.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn function1() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `largest` [INFO] [stdout] --> src/ch10/generic_trait.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | fn largest(list: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Point` [INFO] [stdout] --> src/ch10/generic_trait.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Point` [INFO] [stdout] --> src/ch10/generic_trait.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Result` [INFO] [stdout] --> src/ch10/generic_trait.rs:82:6 [INFO] [stdout] | [INFO] [stdout] 82 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Point` [INFO] [stdout] --> src/ch10/generic_trait.rs:92:12 [INFO] [stdout] | [INFO] [stdout] 92 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `x` [INFO] [stdout] --> src/ch10/generic_trait.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch10/generic_trait.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch10/generic_trait.rs:150:4 [INFO] [stdout] | [INFO] [stdout] 150 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `notify` [INFO] [stdout] --> src/ch10/generic_trait.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn notify(item: impl Summary) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `returns_summarizable` [INFO] [stdout] --> src/ch10/generic_trait.rs:194:4 [INFO] [stdout] | [INFO] [stdout] 194 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate `RustProject` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] = help: convert the identifier to snake case: `rust_project` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `printHello` should have a snake case name [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | mod printHello;//声明printHello这个模块 [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `print_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tupleDemo` should have a snake case name [INFO] [stdout] --> src/ch03/basic_concepts.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn tupleDemo() { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `tuple_demo` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_OwnershipandFunctions` should have a snake case name [INFO] [stdout] --> src/ch04/ownership.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn test_OwnershipandFunctions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_ownershipand_functions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_ReturnValuesAndScope` should have a snake case name [INFO] [stdout] --> src/ch04/ownership.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn test_ReturnValuesAndScope() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_return_values_and_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printRect` should have a snake case name [INFO] [stdout] --> src/ch05/struct_demo.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | fn printRect() { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `print_rect` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printRect2` should have a snake case name [INFO] [stdout] --> src/ch05/struct_demo.rs:162:4 [INFO] [stdout] | [INFO] [stdout] 162 | fn printRect2() { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `print_rect2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_Option` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | fn test_Option() { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `test_option` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `Patterns_that_Bind_to_Values` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | mod Patterns_that_Bind_to_Values { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `patterns_that_bind_to_values` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `Matching_with_Option` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | mod Matching_with_Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `matching_with_option` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `The_Placeholder` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | mod The_Placeholder { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `the_placeholder` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `default_Implementations` should have a snake case name [INFO] [stdout] --> src/ch10/generic_trait.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | mod default_Implementations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `default_implementations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/ch04/ownership.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | let mut s = String::from("hello"); [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/ch05/struct_demo.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let mut user1 = User { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 147 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_hello` [INFO] [stdout] --> src/hello.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn print_hello() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_hello2` [INFO] [stdout] --> src/printHello/hello2.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn print_hello2() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `sub_mod_hello` [INFO] [stdout] --> src/printHello/hello2.rs:15:19 [INFO] [stdout] | [INFO] [stdout] 15 | pub(crate) fn sub_mod_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `sub_mod2_print_hello` [INFO] [stdout] --> src/printHello/hello2.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn sub_mod2_print_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print_hello3` [INFO] [stdout] --> src/printHello/hello3.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn print_hello3() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `ConcreteError` [INFO] [stdout] --> src/common/type_demo.rs:19:6 [INFO] [stdout] | [INFO] [stdout] 19 | enum ConcreteError { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias is never used: `Result` [INFO] [stdout] --> src/common/type_demo.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | type Result = result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/common/type_demo.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `f` [INFO] [stdout] --> src/common/unittype.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn f() { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `f2` [INFO] [stdout] --> src/common/unittype.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn f2() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch03/basic_concepts.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `variable` [INFO] [stdout] --> src/ch03/basic_concepts.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn variable() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `variable2` [INFO] [stdout] --> src/ch03/basic_concepts.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn variable2() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `shadow` [INFO] [stdout] --> src/ch03/basic_concepts.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | fn shadow() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `tupleDemo` [INFO] [stdout] --> src/ch03/basic_concepts.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn tupleDemo() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `another_function` [INFO] [stdout] --> src/ch03/basic_concepts.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn another_function(x: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `five` [INFO] [stdout] --> src/ch03/basic_concepts.rs:70:4 [INFO] [stdout] | [INFO] [stdout] 70 | fn five() -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `loop_break` [INFO] [stdout] --> src/ch03/basic_concepts.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | fn loop_break() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_while` [INFO] [stdout] --> src/ch03/basic_concepts.rs:91:4 [INFO] [stdout] | [INFO] [stdout] 91 | fn test_while() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_for` [INFO] [stdout] --> src/ch03/basic_concepts.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn test_for() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch04/ownership.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_move` [INFO] [stdout] --> src/ch04/ownership.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn test_move() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_OwnershipandFunctions` [INFO] [stdout] --> src/ch04/ownership.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn test_OwnershipandFunctions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `takes_ownership` [INFO] [stdout] --> src/ch04/ownership.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn takes_ownership(some_string: String) { // some_string 进入作用域 [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `makes_copy` [INFO] [stdout] --> src/ch04/ownership.rs:58:4 [INFO] [stdout] | [INFO] [stdout] 58 | fn makes_copy(some_integer: i32) { // some_integer 进入作用域 [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_ReturnValuesAndScope` [INFO] [stdout] --> src/ch04/ownership.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn test_ReturnValuesAndScope() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `gives_ownership` [INFO] [stdout] --> src/ch04/ownership.rs:81:4 [INFO] [stdout] | [INFO] [stdout] 81 | fn gives_ownership() -> String { // gives_ownership 将返回值移动给调用它的函数 [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `takes_and_gives_back` [INFO] [stdout] --> src/ch04/ownership.rs:89:4 [INFO] [stdout] | [INFO] [stdout] 89 | fn takes_and_gives_back(a_string: String) -> String { // a_string 进入作用域 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_touple` [INFO] [stdout] --> src/ch04/ownership.rs:100:4 [INFO] [stdout] | [INFO] [stdout] 100 | fn test_touple() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_length` [INFO] [stdout] --> src/ch04/ownership.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn calculate_length(s: String) -> (String, usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_borrowing` [INFO] [stdout] --> src/ch04/ownership.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn test_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `change` [INFO] [stdout] --> src/ch04/ownership.rs:128:4 [INFO] [stdout] | [INFO] [stdout] 128 | fn change(some_string: &String) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_mutable_borrowing` [INFO] [stdout] --> src/ch04/ownership.rs:137:4 [INFO] [stdout] | [INFO] [stdout] 137 | fn test_mutable_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `change2` [INFO] [stdout] --> src/ch04/ownership.rs:146:4 [INFO] [stdout] | [INFO] [stdout] 146 | fn change2(some_string: &mut String) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_multi_mutable_borrowing` [INFO] [stdout] --> src/ch04/ownership.rs:157:4 [INFO] [stdout] | [INFO] [stdout] 157 | fn test_multi_mutable_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_multi_mutable_borrowing2` [INFO] [stdout] --> src/ch04/ownership.rs:170:4 [INFO] [stdout] | [INFO] [stdout] 170 | fn test_multi_mutable_borrowing2() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_find_first_word` [INFO] [stdout] --> src/ch04/ownership.rs:185:4 [INFO] [stdout] | [INFO] [stdout] 185 | fn test_find_first_word() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `first_word` [INFO] [stdout] --> src/ch04/ownership.rs:203:4 [INFO] [stdout] | [INFO] [stdout] 203 | fn first_word(s: &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_find_first_word_use_slice` [INFO] [stdout] --> src/ch04/ownership.rs:215:4 [INFO] [stdout] | [INFO] [stdout] 215 | fn test_find_first_word_use_slice() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `first_word2` [INFO] [stdout] --> src/ch04/ownership.rs:234:4 [INFO] [stdout] | [INFO] [stdout] 234 | fn first_word2(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_slice` [INFO] [stdout] --> src/ch04/ownership.rs:247:4 [INFO] [stdout] | [INFO] [stdout] 247 | fn test_slice() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `User` [INFO] [stdout] --> src/ch05/struct_demo.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch05/struct_demo.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | pub(crate) fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `define_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn define_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `build_user` [INFO] [stdout] --> src/ch05/struct_demo.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn build_user(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `build_user2` [INFO] [stdout] --> src/ch05/struct_demo.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn build_user2(email: String, username: String) -> User { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `update_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn update_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `tuple_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:85:4 [INFO] [stdout] | [INFO] [stdout] 85 | fn tuple_struct() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `unit_like_struct` [INFO] [stdout] --> src/ch05/struct_demo.rs:101:4 [INFO] [stdout] | [INFO] [stdout] 101 | fn unit_like_struct() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_rectangle_area` [INFO] [stdout] --> src/ch05/struct_demo.rs:107:4 [INFO] [stdout] | [INFO] [stdout] 107 | fn calculate_rectangle_area() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area` [INFO] [stdout] --> src/ch05/struct_demo.rs:117:4 [INFO] [stdout] | [INFO] [stdout] 117 | fn area(width: u32, height: u32) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_rectangle_area2` [INFO] [stdout] --> src/ch05/struct_demo.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn calculate_rectangle_area2() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area2` [INFO] [stdout] --> src/ch05/struct_demo.rs:131:4 [INFO] [stdout] | [INFO] [stdout] 131 | fn area2(dimensions: (u32, u32 )) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `calculate_rectangle_area3` [INFO] [stdout] --> src/ch05/struct_demo.rs:142:4 [INFO] [stdout] | [INFO] [stdout] 142 | fn calculate_rectangle_area3() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `area3` [INFO] [stdout] --> src/ch05/struct_demo.rs:152:4 [INFO] [stdout] | [INFO] [stdout] 152 | fn area3(rectangle: &Rectangle) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `printRect` [INFO] [stdout] --> src/ch05/struct_demo.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | fn printRect() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `printRect2` [INFO] [stdout] --> src/ch05/struct_demo.rs:162:4 [INFO] [stdout] | [INFO] [stdout] 162 | fn printRect2() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `area` [INFO] [stdout] --> src/ch05/struct_demo.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | fn area(&self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `can_hold` [INFO] [stdout] --> src/ch05/struct_demo.rs:178:8 [INFO] [stdout] | [INFO] [stdout] 178 | 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/ch05/struct_demo.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | fn square(size: u32) -> Rectangle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_method_syntax` [INFO] [stdout] --> src/ch05/struct_demo.rs:189:4 [INFO] [stdout] | [INFO] [stdout] 189 | fn test_method_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_associated_functions` [INFO] [stdout] --> src/ch05/struct_demo.rs:206:4 [INFO] [stdout] | [INFO] [stdout] 206 | fn test_associated_functions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `IpAddr` [INFO] [stdout] --> src/ch06/enums.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | struct IpAddr { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `use_ip_addr` [INFO] [stdout] --> src/ch06/enums.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | fn use_ip_addr() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Message` [INFO] [stdout] --> src/ch06/enums.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Message { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `QuitMessage` [INFO] [stdout] --> src/ch06/enums.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | struct QuitMessage; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `MoveMessage` [INFO] [stdout] --> src/ch06/enums.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | struct MoveMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `WriteMessage` [INFO] [stdout] --> src/ch06/enums.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | struct WriteMessage(String); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `ChangeColorMessage` [INFO] [stdout] --> src/ch06/enums.rs:65:8 [INFO] [stdout] | [INFO] [stdout] 65 | struct ChangeColorMessage(i32, i32, i32); // 元组结构体 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `call` [INFO] [stdout] --> src/ch06/enums.rs:71:8 [INFO] [stdout] | [INFO] [stdout] 71 | fn call(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_enum_method` [INFO] [stdout] --> src/ch06/enums.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn test_enum_method() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_Option` [INFO] [stdout] --> src/ch06/enums.rs:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | fn test_Option() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Coin` [INFO] [stdout] --> src/ch06/enums.rs:92:6 [INFO] [stdout] | [INFO] [stdout] 92 | enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `value_in_cents` [INFO] [stdout] --> src/ch06/enums.rs:99:4 [INFO] [stdout] | [INFO] [stdout] 99 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `value_in_cents2` [INFO] [stdout] --> src/ch06/enums.rs:108:4 [INFO] [stdout] | [INFO] [stdout] 108 | fn value_in_cents2(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Alabama` [INFO] [stdout] --> src/ch06/enums.rs:125:9 [INFO] [stdout] | [INFO] [stdout] 125 | Alabama, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Alaska` [INFO] [stdout] --> src/ch06/enums.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | Alaska, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Coin` [INFO] [stdout] --> src/ch06/enums.rs:130:21 [INFO] [stdout] | [INFO] [stdout] 130 | pub(crate) enum Coin { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `value_in_cents` [INFO] [stdout] --> src/ch06/enums.rs:138:8 [INFO] [stdout] | [INFO] [stdout] 138 | fn value_in_cents(coin: Coin) -> u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `plus_one` [INFO] [stdout] --> src/ch06/enums.rs:158:8 [INFO] [stdout] | [INFO] [stdout] 158 | fn plus_one(x: Option) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 165 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:174:8 [INFO] [stdout] | [INFO] [stdout] 174 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch06/enums.rs:190:8 [INFO] [stdout] | [INFO] [stdout] 190 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_if_let` [INFO] [stdout] --> src/ch06/enums.rs:198:8 [INFO] [stdout] | [INFO] [stdout] 198 | fn test_if_let() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_coin1` [INFO] [stdout] --> src/ch06/enums.rs:205:8 [INFO] [stdout] | [INFO] [stdout] 205 | fn test_coin1(coin: Patterns_that_Bind_to_Values::Coin) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_coin2` [INFO] [stdout] --> src/ch06/enums.rs:213:19 [INFO] [stdout] | [INFO] [stdout] 213 | pub(crate) fn test_coin2(coin: Coin) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_waitlist` [INFO] [stdout] --> src/ch07/package_crate_module.rs:4:16 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant` [INFO] [stdout] --> src/ch07/package_crate_module.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `add_to_waitlist` [INFO] [stdout] --> src/ch07/mod_separate/lib/front_of_house.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `eat_at_restaurant` [INFO] [stdout] --> src/ch07/mod_separate/lib.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch10/generic_trait.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `function1` [INFO] [stdout] --> src/ch10/generic_trait.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn function1() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `largest` [INFO] [stdout] --> src/ch10/generic_trait.rs:22:4 [INFO] [stdout] | [INFO] [stdout] 22 | fn largest(list: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `x` [INFO] [stdout] --> src/ch10/generic_trait.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | x: T, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `y` [INFO] [stdout] --> src/ch10/generic_trait.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | y: T, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `x` [INFO] [stdout] --> src/ch10/generic_trait.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | x: T, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `y` [INFO] [stdout] --> src/ch10/generic_trait.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | y: U, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum is never used: `Result` [INFO] [stdout] --> src/ch10/generic_trait.rs:82:6 [INFO] [stdout] | [INFO] [stdout] 82 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct is never constructed: `Point` [INFO] [stdout] --> src/ch10/generic_trait.rs:92:12 [INFO] [stdout] | [INFO] [stdout] 92 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `x` [INFO] [stdout] --> src/ch10/generic_trait.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main` [INFO] [stdout] --> src/ch10/generic_trait.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test` [INFO] [stdout] --> src/ch10/generic_trait.rs:150:4 [INFO] [stdout] | [INFO] [stdout] 150 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `notify` [INFO] [stdout] --> src/ch10/generic_trait.rs:188:8 [INFO] [stdout] | [INFO] [stdout] 188 | pub fn notify(item: impl Summary) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `returns_summarizable` [INFO] [stdout] --> src/ch10/generic_trait.rs:194:4 [INFO] [stdout] | [INFO] [stdout] 194 | fn returns_summarizable() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate `RustProject` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] = help: convert the identifier to snake case: `rust_project` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `printHello` should have a snake case name [INFO] [stdout] --> src/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | mod printHello;//声明printHello这个模块 [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `print_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `tupleDemo` should have a snake case name [INFO] [stdout] --> src/ch03/basic_concepts.rs:49:4 [INFO] [stdout] | [INFO] [stdout] 49 | fn tupleDemo() { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `tuple_demo` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_OwnershipandFunctions` should have a snake case name [INFO] [stdout] --> src/ch04/ownership.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn test_OwnershipandFunctions() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_ownershipand_functions` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_ReturnValuesAndScope` should have a snake case name [INFO] [stdout] --> src/ch04/ownership.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn test_ReturnValuesAndScope() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_return_values_and_scope` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printRect` should have a snake case name [INFO] [stdout] --> src/ch05/struct_demo.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | fn printRect() { [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `print_rect` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printRect2` should have a snake case name [INFO] [stdout] --> src/ch05/struct_demo.rs:162:4 [INFO] [stdout] | [INFO] [stdout] 162 | fn printRect2() { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `print_rect2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_Option` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:84:4 [INFO] [stdout] | [INFO] [stdout] 84 | fn test_Option() { [INFO] [stdout] | ^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `test_option` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `Patterns_that_Bind_to_Values` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | mod Patterns_that_Bind_to_Values { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `patterns_that_bind_to_values` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `Matching_with_Option` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | mod Matching_with_Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `matching_with_option` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `The_Placeholder` should have a snake case name [INFO] [stdout] --> src/ch06/enums.rs:173:5 [INFO] [stdout] | [INFO] [stdout] 173 | mod The_Placeholder { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `the_placeholder` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module `default_Implementations` should have a snake case name [INFO] [stdout] --> src/ch10/generic_trait.rs:162:5 [INFO] [stdout] | [INFO] [stdout] 162 | mod default_Implementations { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `default_implementations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 153 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 7.46s [INFO] running `Command { std: "docker" "inspect" "aafee5acc1ad1b79de8dd5dad3a2a7a217f921adbbab8ab33aeb8672613f54fe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aafee5acc1ad1b79de8dd5dad3a2a7a217f921adbbab8ab33aeb8672613f54fe", kill_on_drop: false }` [INFO] [stdout] aafee5acc1ad1b79de8dd5dad3a2a7a217f921adbbab8ab33aeb8672613f54fe