[INFO] cloning repository https://github.com/RevelationOfTuring/Rust-exercise [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/RevelationOfTuring/Rust-exercise" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRevelationOfTuring%2FRust-exercise", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRevelationOfTuring%2FRust-exercise'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 85833a6e8ad2ed3365b46f1059682316bdcdc8ef [INFO] checking RevelationOfTuring/Rust-exercise/85833a6e8ad2ed3365b46f1059682316bdcdc8ef against master#ab869e094a907cc5d19b4080f22eccaf347f1f95 for pr-129604 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FRevelationOfTuring%2FRust-exercise" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/RevelationOfTuring/Rust-exercise on toolchain ab869e094a907cc5d19b4080f22eccaf347f1f95 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/RevelationOfTuring/Rust-exercise [INFO] finished tweaking git repo https://github.com/RevelationOfTuring/Rust-exercise [INFO] tweaked toml for git repo https://github.com/RevelationOfTuring/Rust-exercise written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/RevelationOfTuring/Rust-exercise already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2a9260a2ab240e07ae9b614a078750bfda30b9fb9b46d8490bc5c8694ea89442 [INFO] running `Command { std: "docker" "start" "-a" "2a9260a2ab240e07ae9b614a078750bfda30b9fb9b46d8490bc5c8694ea89442", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2a9260a2ab240e07ae9b614a078750bfda30b9fb9b46d8490bc5c8694ea89442", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2a9260a2ab240e07ae9b614a078750bfda30b9fb9b46d8490bc5c8694ea89442", kill_on_drop: false }` [INFO] [stdout] 2a9260a2ab240e07ae9b614a078750bfda30b9fb9b46d8490bc5c8694ea89442 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+ab869e094a907cc5d19b4080f22eccaf347f1f95" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f0353b5c7a4a36c06929e8040e7f7af310416ace08458eb45ec4b3fc31ae571e [INFO] running `Command { std: "docker" "start" "-a" "f0353b5c7a4a36c06929e8040e7f7af310416ace08458eb45ec4b3fc31ae571e", kill_on_drop: false }` [INFO] [stderr] Checking rust-exercise v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused macro definition: `calculate` [INFO] [stdout] --> src/macro_rules/domain_specific_languages.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | macro_rules! calculate { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `calculate` [INFO] [stdout] --> src/macro_rules/variadic_interfaces.rs:9:14 [INFO] [stdout] | [INFO] [stdout] 9 | macro_rules! calculate { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arg` [INFO] [stdout] --> src/generics.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | fn generics_function(arg: T) { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_arg` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused label [INFO] [stdout] --> src/labels.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | 'inner: loop { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trailing semicolon in macro used in expression position [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:23:33 [INFO] [stdout] | [INFO] [stdout] 23 | ($b.len(),)); [INFO] [stdout] | ^ [INFO] [stdout] ... [INFO] [stdout] 35 | assert_equal_len!(a,b,hi,+=) [INFO] [stdout] | ---------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stdout] = note: for more information, see issue #79813 [INFO] [stdout] = note: macro invocations at the end of a block are treated as expressions [INFO] [stdout] = note: to ignore the value produced by the macro, add a semicolon after the invocation of `assert_equal_len` [INFO] [stdout] = note: `#[warn(semicolon_in_expressions_from_macros)]` on by default [INFO] [stdout] = note: this warning originates in the macro `assert_equal_len` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_visibility.rs:77:4 [INFO] [stdout] | [INFO] [stdout] 77 | fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: cannot test inner items [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 85 | test_michael!(add_michael,1,2,3); [INFO] [stdout] | -------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnameable_test_items)]` on by default [INFO] [stdout] = note: this warning originates in the attribute macro `test` which comes from the expansion of the macro `test_michael` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `private_function` is never used [INFO] [stdout] --> src/module_visibility.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | fn private_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_visibility.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: cannot test inner items [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | test_michael!(mul_michael,4,5,20); [INFO] [stdout] | --------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the attribute macro `test` which comes from the expansion of the macro `test_michael` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_access` is never used [INFO] [stdout] --> src/module_visibility.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn indirect_access() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_public_function_in_my_mod` is never used [INFO] [stdout] --> src/module_visibility.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn call_public_function_in_my_mod() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: cannot test inner items [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:65:17 [INFO] [stdout] | [INFO] [stdout] 65 | #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 87 | test_michael!(sub_michael,3,2,1); [INFO] [stdout] | -------------------------------- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the attribute macro `test` which comes from the expansion of the macro `test_michael` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `public_function_in_crate` is never used [INFO] [stdout] --> src/module_visibility.rs:65:19 [INFO] [stdout] | [INFO] [stdout] 65 | pub(crate) fn public_function_in_crate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_visibility.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `private_function` is never used [INFO] [stdout] --> src/module_visibility.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | fn private_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `public_function_in_my_mod` is never used [INFO] [stdout] --> src/module_visibility.rs:40:53 [INFO] [stdout] | [INFO] [stdout] 40 | pub(in crate::module_visibility::my_mod) fn public_function_in_my_mod() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `public_function_in_my_mod_inner` is never used [INFO] [stdout] --> src/module_visibility.rs:47:22 [INFO] [stdout] | [INFO] [stdout] 47 | pub(self) fn public_function_in_my_mod_inner() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `public_function_in_super_mod` is never used [INFO] [stdout] --> src/module_visibility.rs:52:23 [INFO] [stdout] | [INFO] [stdout] 52 | pub(super) fn public_function_in_super_mod() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_visibility.rs:71:16 [INFO] [stdout] | [INFO] [stdout] 71 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenBox` is never constructed [INFO] [stdout] --> src/module_struct_visibility.rs:9:16 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct OpenBox { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ClosedBox` is never constructed [INFO] [stdout] --> src/module_struct_visibility.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ClosedBox { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/module_struct_visibility.rs:22:16 [INFO] [stdout] | [INFO] [stdout] 20 | impl ClosedBox { [INFO] [stdout] | -------------------- associated function in this implementation [INFO] [stdout] 21 | // 一个公有的构造器方法 [INFO] [stdout] 22 | pub fn new(contents: T) -> ClosedBox { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_super_and_self.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_super_and_self.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_super_and_self.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_call` is never used [INFO] [stdout] --> src/module_super_and_self.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn indirect_call() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_super_and_self.rs:21:16 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_file_hierarchy.rs:18:4 [INFO] [stdout] | [INFO] [stdout] 18 | fn function(){ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/mod.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `private_function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/mod.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn private_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_access` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/mod.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn indirect_access() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `public_function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/inaccessible.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn public_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/nested.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `private_function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/nested.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn private_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `are_you_on_linux` is never used [INFO] [stdout] --> src/attribute_cfg.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn are_you_on_linux() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generics_function` is never used [INFO] [stdout] --> src/generics.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn generics_function(arg: T) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `multiply_v1` is never used [INFO] [stdout] --> src/error_handling_result_map.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | fn multiply_v1(first_num_str: &str, second_num_str: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_result` is never used [INFO] [stdout] --> src/error_handling_result_map.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | fn print_result(result: Result) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `multiply_v2` is never used [INFO] [stdout] --> src/error_handling_result_map.rs:71:8 [INFO] [stdout] | [INFO] [stdout] 71 | fn multiply_v2(first_num_str: &str, second_num_str: &str) -> Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Result` is never used [INFO] [stdout] --> src/error_handling_multiple_error_types_boxing_errors.rs:15:10 [INFO] [stdout] | [INFO] [stdout] 15 | type Result = std::result::Result>; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `EmptyVec` is never constructed [INFO] [stdout] --> src/error_handling_multiple_error_types_boxing_errors.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 18 | struct EmptyVec; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `double_first` is never used [INFO] [stdout] --> src/error_handling_multiple_error_types_boxing_errors.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | fn double_first(vec: Vec<&str>) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `print_result` is never used [INFO] [stdout] --> src/error_handling_multiple_error_types_boxing_errors.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | fn print_result(result: Result) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Bird` is never used [INFO] [stdout] --> src/trait_object.rs:26:7 [INFO] [stdout] | [INFO] [stdout] 26 | trait Bird { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Duck` is never constructed [INFO] [stdout] --> src/trait_object.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Duck; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Swan` is never constructed [INFO] [stdout] --> src/trait_object.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | struct Swan; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_box` is never used [INFO] [stdout] --> src/scoping_rules/raii/mod.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | fn create_box() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Book` is never constructed [INFO] [stdout] --> src/scoping_rules/borrowing/mutability.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | struct Book { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `borrow_book` is never used [INFO] [stdout] --> src/scoping_rules/borrowing/mutability.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 20 | fn borrow_book(book: &Book) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `new_edition` is never used [INFO] [stdout] --> src/scoping_rules/borrowing/mutability.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | fn new_edition(book: &mut Book) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `NUM` is never used [INFO] [stdout] --> src/lifetimes/static.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | static NUM: i32 = 1024; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MichaelMathError` is never used [INFO] [stdout] --> src/std_library_types/result.rs:18:14 [INFO] [stdout] | [INFO] [stdout] 18 | pub enum MichaelMathError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MichaelMathError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `MichaelResult` is never used [INFO] [stdout] --> src/std_library_types/result.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | pub type MichaelResult = Result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `divide` is never used [INFO] [stdout] --> src/std_library_types/result.rs:33:12 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn divide(divident: f64, divisor: f64) -> MichaelResult { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sqrt` is never used [INFO] [stdout] --> src/std_library_types/result.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 45 | pub fn sqrt(num: f64) -> MichaelResult { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ln` is never used [INFO] [stdout] --> src/std_library_types/result.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn ln(num: f64) -> MichaelResult { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `MichaelMathError` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | pub enum MichaelMathError { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `MichaelMathError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `MichaelResult` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:21:10 [INFO] [stdout] | [INFO] [stdout] 21 | type MichaelResult = Result; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `div` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:23:12 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn div(divident: f64, divisor: f64) -> MichaelResult { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ln` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:31:12 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn ln(num: f64) -> MichaelResult { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sqrt` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn sqrt(num: f64) -> MichaelResult { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `op` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn op(num1: f64, num2: f64) { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `run_op` is never used [INFO] [stdout] --> src/std_library_types/result_with_question_mark.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | fn run_op(num1: f64, num2: f64) -> MichaelResult { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `TEXT` is never used [INFO] [stdout] --> src/file_io/create.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | static TEXT: &str = "This is a file for create test!!"; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 60 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/file_io/open.rs:23:77 [INFO] [stdout] | [INFO] [stdout] 23 | Err(err) => panic!("file {} is opened failed: {}", display, err.description()), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/file_io/open.rs:30:75 [INFO] [stdout] | [INFO] [stdout] 30 | Err(err) => panic!("file {} is read failed: {}", display, err.description()), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated method `std::error::Error::description`: use the Display impl or to_string() [INFO] [stdout] --> src/file_io/create.rs:27:78 [INFO] [stdout] | [INFO] [stdout] 27 | Err(err) => panic!("file {} is created failed: {}", display, err.description()), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `noisy_unused_variable` [INFO] [stdout] --> src/variable_bindings.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let noisy_unused_variable = 2u32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_noisy_unused_variable` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `closure_annotated` [INFO] [stdout] --> src/function_closures.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let closure_annotated = |i: i32| -> i32 { i + 1 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_closure_annotated` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reborrow` [INFO] [stdout] --> src/function_closures_capturing.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | let reborrow = &mut count; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reborrow` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/function_diverging_functions.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let a = some_fn(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arg` [INFO] [stdout] --> src/generics.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | fn generics_function(arg: T) { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_arg` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/object_safe.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | let mut x = 1024; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/object_safe.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | let mut x = 1024; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `foo2` [INFO] [stdout] --> src/object_safe.rs:157:17 [INFO] [stdout] | [INFO] [stdout] 157 | let mut foo2 = Foo2(1024); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_foo2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/object_safe.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | let mut foo2 = Foo2(1024); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/scoping_rules/raii/destructor.rs:18:13 [INFO] [stdout] | [INFO] [stdout] 18 | let x = S; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/lifetimes/explicit_annotation.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | let x = 1024; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `test3` [INFO] [stdout] --> src/traits/derive.rs:41:13 [INFO] [stdout] | [INFO] [stdout] 41 | let test3 = Test3(1024); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_test3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rhs` [INFO] [stdout] --> src/traits/operator_overloading.rs:36:22 [INFO] [stdout] | [INFO] [stdout] 36 | fn add(self, rhs: Test1) -> Self::Output { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rhs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `rhs` [INFO] [stdout] --> src/traits/operator_overloading.rs:48:22 [INFO] [stdout] | [INFO] [stdout] 48 | fn add(self, rhs: Test2) -> Self::Output { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_rhs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `test2` [INFO] [stdout] --> src/traits/drop.rs:29:17 [INFO] [stdout] | [INFO] [stdout] 29 | let test2 = Test { name: "test2" }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_test2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `test3` [INFO] [stdout] --> src/traits/drop.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | let test3 = Test { name: "test3" }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_test3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `test4` [INFO] [stdout] --> src/traits/drop.rs:33:21 [INFO] [stdout] | [INFO] [stdout] 33 | let test4 = Test { name: "test4" }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_test4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/std_library_types/hashset.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | let mut set2: HashSet = vec![3, 4, 5, 6, 7, 8].into_iter().collect(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `value` is never read [INFO] [stdout] --> src/conversion.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 27 | struct Number { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 28 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Number` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Person` is never constructed [INFO] [stdout] --> src/tuples.rs:14:12 [INFO] [stdout] | [INFO] [stdout] 14 | struct Person<'a> { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/structures.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | struct Point { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 5 | x: f32, [INFO] [stdout] | ^ [INFO] [stdout] 6 | y: f32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `field2` and `field3` are never read [INFO] [stdout] --> src/destructure_struct.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 6 | struct S1 { [INFO] [stdout] | -- fields in this struct [INFO] [stdout] 7 | field1: i32, [INFO] [stdout] 8 | field2: String, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 9 | field3: (u32, f64), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `S1` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `foo` is never used [INFO] [stdout] --> src/function_diverging_functions.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | fn foo() -> ! { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `private_function` is never used [INFO] [stdout] --> src/module_visibility.rs:34:12 [INFO] [stdout] | [INFO] [stdout] 34 | fn private_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/module_visibility.rs:71:16 [INFO] [stdout] | [INFO] [stdout] 71 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `contents` is never read [INFO] [stdout] --> src/module_struct_visibility.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct ClosedBox { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 16 | // 私有字段 [INFO] [stdout] 17 | contents: T, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `public_function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/inaccessible.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn public_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `private_function` is never used [INFO] [stdout] --> src/module_file_hierarchy/my_mod/nested.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn private_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unused_function` is never used [INFO] [stdout] --> src/attribute_dead_code.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 16 | fn unused_function() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generics_function` is never used [INFO] [stdout] --> src/generics.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn generics_function(arg: T) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `A` is never constructed [INFO] [stdout] --> src/generics_trait.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 32 | struct A { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Turkey` is never constructed [INFO] [stdout] --> src/generics_empty_bounds.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | struct Turkey; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `number` is never read [INFO] [stdout] --> src/error_handling_unpacking_options_with_question_mark.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 43 | struct PhoneNumber { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] 44 | area_code: Option, [INFO] [stdout] 45 | number: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PhoneNumber` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/error_handling_option_and_unwrap_combinator_map.rs:27:19 [INFO] [stdout] | [INFO] [stdout] 27 | struct Cooked(Food); [INFO] [stdout] | ------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Cooked` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Double` is never used [INFO] [stdout] --> src/object_safe.rs:90:11 [INFO] [stdout] | [INFO] [stdout] 90 | trait Double { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/object_safe.rs:116:12 [INFO] [stdout] | [INFO] [stdout] 115 | trait Double1 { [INFO] [stdout] | ------- associated function in this trait [INFO] [stdout] 116 | fn new() -> Self where Self: Sized; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `double` is never used [INFO] [stdout] --> src/object_safe.rs:142:12 [INFO] [stdout] | [INFO] [stdout] 139 | trait Double2 { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] ... [INFO] [stdout] 142 | fn double(&mut self); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/object_safe.rs:145:17 [INFO] [stdout] | [INFO] [stdout] 145 | struct Foo2(i32); [INFO] [stdout] | ---- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lifetimes/structs.rs:13:25 [INFO] [stdout] | [INFO] [stdout] 13 | struct Borrowed<'a>(&'a i32); [INFO] [stdout] | -------- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Borrowed` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/lifetimes/structs.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 17 | struct NameBorrowed<'a> { [INFO] [stdout] | ------------ fields in this struct [INFO] [stdout] 18 | x: &'a i32, [INFO] [stdout] | ^ [INFO] [stdout] 19 | y: &'a i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `NameBorrowed` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lifetimes/structs.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | Num(i32), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Either` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 25 | Num(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lifetimes/structs.rs:26:13 [INFO] [stdout] | [INFO] [stdout] 26 | Ref(&'a i32), [INFO] [stdout] | --- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Either` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 26 | Ref(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/lifetimes/traits.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | struct S<'a> { [INFO] [stdout] | - field in this struct [INFO] [stdout] 13 | name: &'a str [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/lifetimes/bounds.rs:17:27 [INFO] [stdout] | [INFO] [stdout] 17 | struct Ref<'a, T: 'a>(&'a T); [INFO] [stdout] | --- ^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Ref` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/traits/derive.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | struct Test3(i32); [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/traits/clone.rs:18:21 [INFO] [stdout] | [INFO] [stdout] 18 | struct Pair<'a>(Box, &'a str); [INFO] [stdout] | ---- ^^^^^^^^ ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] = note: `Pair` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/std_library_types/box_stack_heap.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 14 | struct Test1 { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 15 | x: f32, [INFO] [stdout] | ^ [INFO] [stdout] 16 | y: f64, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `field1` and `field2` are never read [INFO] [stdout] --> src/std_library_types/box_stack_heap.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 20 | struct Test2 { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 21 | field1: Test1, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 22 | field2: Test1, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_michael` is never used [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | op!(add_michael,Add,+=,add); // Add是一个trait,add是该trait中的方法名 [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mul_michael` is never used [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | op!(mul_michael,Mul,*=,mul); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sub_michael` is never used [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | op!(sub_michael,Sub,-=,sub); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_michael` is never used [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:85:23 [INFO] [stdout] | [INFO] [stdout] 85 | test_michael!(add_michael,1,2,3); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `test_michael` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mul_michael` is never used [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:86:23 [INFO] [stdout] | [INFO] [stdout] 86 | test_michael!(mul_michael,4,5,20); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `test_michael` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sub_michael` is never used [INFO] [stdout] --> src/macro_rules/dont_repeat_yourself.rs:87:23 [INFO] [stdout] | [INFO] [stdout] 87 | test_michael!(sub_michael,3,2,1); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `test_michael` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_ToString_and_FromStr` should have a snake case name [INFO] [stdout] --> src/conversion.rs:52:8 [INFO] [stdout] | [INFO] [stdout] 52 | fn test_ToString_and_FromStr() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_to_string_and_from_str` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021 [INFO] [stdout] --> src/function_closures_examples_in_std.rs:45:31 [INFO] [stdout] | [INFO] [stdout] 45 | println!("{}", array2.into_iter().any(|&x| x == 2)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(array_into_iter)]` on by default [INFO] [stdout] help: use `.iter()` instead of `.into_iter()` to avoid ambiguity [INFO] [stdout] | [INFO] [stdout] 45 | println!("{}", array2.iter().any(|&x| x == 2)); [INFO] [stdout] | ~~~~ [INFO] [stdout] help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value [INFO] [stdout] | [INFO] [stdout] 45 | println!("{}", IntoIterator::into_iter(array2).any(|&x| x == 2)); [INFO] [stdout] | ++++++++++++++++++++++++ ~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this method call resolves to `<&[T; N] as IntoIterator>::into_iter` (due to backwards compatibility), but will resolve to `<[T; N] as IntoIterator>::into_iter` in Rust 2021 [INFO] [stdout] --> src/function_closures_examples_in_std.rs:88:33 [INFO] [stdout] | [INFO] [stdout] 88 | println!("{:?}", array2.into_iter().find(|&&x| x == 2)); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2021 [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `.iter()` instead of `.into_iter()` to avoid ambiguity [INFO] [stdout] | [INFO] [stdout] 88 | println!("{:?}", array2.iter().find(|&&x| x == 2)); [INFO] [stdout] | ~~~~ [INFO] [stdout] help: or use `IntoIterator::into_iter(..)` instead of `.into_iter()` to explicitly iterate by value [INFO] [stdout] | [INFO] [stdout] 88 | println!("{:?}", IntoIterator::into_iter(array2).find(|&&x| x == 2)); [INFO] [stdout] | ++++++++++++++++++++++++ ~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::str::from_utf8` with a invalid literal always return an error [INFO] [stdout] --> src/std_library_types/string_literals_and_escapes.rs:118:15 [INFO] [stdout] | [INFO] [stdout] 115 | let byte_string_not_uft8 = b"\x82\xe6\x82\xa8\x82\xb1\x82"; [INFO] [stdout] | ------------------------------- the literal was valid UTF-8 up to the 0 bytes [INFO] [stdout] ... [INFO] [stdout] 118 | match std::str::from_utf8(byte_string_not_uft8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(invalid_from_utf8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 66 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.63s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: rust-exercise v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "f0353b5c7a4a36c06929e8040e7f7af310416ace08458eb45ec4b3fc31ae571e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f0353b5c7a4a36c06929e8040e7f7af310416ace08458eb45ec4b3fc31ae571e", kill_on_drop: false }` [INFO] [stdout] f0353b5c7a4a36c06929e8040e7f7af310416ace08458eb45ec4b3fc31ae571e