[INFO] cloning repository https://github.com/james-zhang-bing/leetcode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/james-zhang-bing/leetcode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjames-zhang-bing%2Fleetcode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjames-zhang-bing%2Fleetcode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 193897084a90f0beb374be0865b8938fedd8d4f9 [INFO] checking james-zhang-bing/leetcode against master#1f12b9b0fdbe735968ac002792a720f0ba4faca6 for crater-rollup-uwu [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjames-zhang-bing%2Fleetcode" "/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/james-zhang-bing/leetcode on toolchain 1f12b9b0fdbe735968ac002792a720f0ba4faca6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1f12b9b0fdbe735968ac002792a720f0ba4faca6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/james-zhang-bing/leetcode [INFO] finished tweaking git repo https://github.com/james-zhang-bing/leetcode [INFO] tweaked toml for git repo https://github.com/james-zhang-bing/leetcode written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/james-zhang-bing/leetcode 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" "+1f12b9b0fdbe735968ac002792a720f0ba4faca6" "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" "+1f12b9b0fdbe735968ac002792a720f0ba4faca6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ea709f73ac8e85dbcf1d27156876bc04866c5669ca6d8ac163750c68aa4e4c7d [INFO] running `Command { std: "docker" "start" "-a" "ea709f73ac8e85dbcf1d27156876bc04866c5669ca6d8ac163750c68aa4e4c7d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ea709f73ac8e85dbcf1d27156876bc04866c5669ca6d8ac163750c68aa4e4c7d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ea709f73ac8e85dbcf1d27156876bc04866c5669ca6d8ac163750c68aa4e4c7d", kill_on_drop: false }` [INFO] [stdout] ea709f73ac8e85dbcf1d27156876bc04866c5669ca6d8ac163750c68aa4e4c7d [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" "+1f12b9b0fdbe735968ac002792a720f0ba4faca6" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b0e875b286b2722760e1fa06902a184760143c4ff9a3bfa6b24137ee7ac3048e [INFO] running `Command { std: "docker" "start" "-a" "b0e875b286b2722760e1fa06902a184760143c4ff9a3bfa6b24137ee7ac3048e", kill_on_drop: false }` [INFO] [stderr] Checking leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: denote infinite loops with `loop { ... }` [INFO] [stdout] --> src/two_num_add_2.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | while true { [INFO] [stdout] | ^^^^^^^^^^ help: use `loop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(while_true)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `paris` should have an upper camel case name [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ help: convert the identifier to upper camel case: `Paris` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::iter; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 25 - let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] 25 + let mut map_wp: Vec<(usize, usize)> = vec![(0, 0); n as usize]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `wp` should have an upper camel case name [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | struct wp { [INFO] [stdout] | ^^ help: convert the identifier to upper camel case (notice the capitalization): `Wp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: denote infinite loops with `loop { ... }` [INFO] [stdout] --> src/two_num_add_2.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | while true { [INFO] [stdout] | ^^^^^^^^^^ help: use `loop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(while_true)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `paris` should have an upper camel case name [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ help: convert the identifier to upper camel case: `Paris` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::iter; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 25 - let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] 25 + let mut map_wp: Vec<(usize, usize)> = vec![(0, 0); n as usize]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `wp` should have an upper camel case name [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | struct wp { [INFO] [stdout] | ^^ help: convert the identifier to upper camel case (notice the capitalization): `Wp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/str_z_convert_6.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/str_z_convert_6.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [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: `min_time` [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:85:14 [INFO] [stdout] | [INFO] [stdout] 85 | let (min_time,way_to_end)=&mut map_wp[n-1]; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_time` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> src/main.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let reference_to_nothing = dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/main.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let r=&s; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `from_vec`, and `to_vec` are never used [INFO] [stdout] --> src/merge_two_lists_21.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 15 | impl ListNode { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 16 | #[inline] [INFO] [stdout] 17 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | fn from_vec(vec: Vec) -> Option> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | fn to_vec(&self) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `merge_two_lists` is never used [INFO] [stdout] --> src/merge_two_lists_21.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 43 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 44 | pub fn merge_two_lists( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/merge_two_lists_21.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_vec` and `to_vec` are never used [INFO] [stdout] --> src/two_num_add_2.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 15 | impl ListNode { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | fn from_vec(vec: Vec) -> Option> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | fn to_vec(&self) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Solution` is never used [INFO] [stdout] --> src/two_num_add_2.rs:142:11 [INFO] [stdout] | [INFO] [stdout] 142 | pub trait Solution { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `paris` is never used [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_valid` is never used [INFO] [stdout] --> src/valid_paris_20.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn is_valid(s: String) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/valid_paris_20.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_median_sorted_arrays` is never used [INFO] [stdout] --> src/find_mid_num_4.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_median_sorted_arrays(nums1: Vec, nums2: Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/find_mid_num_4.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `longest_palindrome` and `is_palindrome` are never used [INFO] [stdout] --> src/palindrome_5.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 9 | pub fn longest_palindrome(s: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn is_palindrome(v: &[char]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/palindrome_5.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `convert` is never used [INFO] [stdout] --> src/str_z_convert_6.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn convert(s: String, num_rows: i32) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/str_z_convert_6.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `reverse` is never used [INFO] [stdout] --> src/number_reverse_7.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn reverse(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/number_reverse_7.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_ocurrences` is never used [INFO] [stdout] --> src/bigram_1078.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_ocurrences(text: String, first: String, second: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/bigram_1078.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `four_sum` is never used [INFO] [stdout] --> src/sum_four_nums_18.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn four_sum(nums: Vec, target: i32) -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/sum_four_nums_18.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `invert_tree` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 28 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 29 | pub fn invert_tree(root: Option>>) -> Option>> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/reversal_tree_226.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 52 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 53 | #[inline] [INFO] [stdout] 54 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `preorder_traversal` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 20 | //迭代法 [INFO] [stdout] 21 | pub fn preorder_traversal(root: Option>>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 51 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 52 | #[inline] [INFO] [stdout] 53 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyQueue` is never constructed [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct MyQueue { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, `peek`, and `empty` are never used [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl MyQueue { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 25 | [INFO] [stdout] 26 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn peek(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | fn empty(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `valid_partition` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 16 | pub fn valid_partition(nums: Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_3_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn can_cut_3_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_2_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn can_cut_2_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | struct Solution {} [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `count_paths` is never used [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 16 | pub fn count_paths(n: i32, roads: Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `wp` is never constructed [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | struct wp { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 46 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/str_z_convert_6.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/str_z_convert_6.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [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: `min_time` [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:85:14 [INFO] [stdout] | [INFO] [stdout] 85 | let (min_time,way_to_end)=&mut map_wp[n-1]; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_time` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> src/main.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let reference_to_nothing = dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/main.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let r=&s; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `paris` is never used [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_median_sorted_arrays` is never used [INFO] [stdout] --> src/find_mid_num_4.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_median_sorted_arrays(nums1: Vec, nums2: Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/find_mid_num_4.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_ocurrences` is never used [INFO] [stdout] --> src/bigram_1078.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_ocurrences(text: String, first: String, second: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/bigram_1078.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `invert_tree` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 28 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 29 | pub fn invert_tree(root: Option>>) -> Option>> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/reversal_tree_226.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 52 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 53 | #[inline] [INFO] [stdout] 54 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `preorder_traversal` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 20 | //迭代法 [INFO] [stdout] 21 | pub fn preorder_traversal(root: Option>>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 51 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 52 | #[inline] [INFO] [stdout] 53 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyQueue` is never constructed [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct MyQueue { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, `peek`, and `empty` are never used [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl MyQueue { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 25 | [INFO] [stdout] 26 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn peek(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | fn empty(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_3_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn can_cut_3_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_2_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn can_cut_2_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 26 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s [INFO] running `Command { std: "docker" "inspect" "b0e875b286b2722760e1fa06902a184760143c4ff9a3bfa6b24137ee7ac3048e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b0e875b286b2722760e1fa06902a184760143c4ff9a3bfa6b24137ee7ac3048e", kill_on_drop: false }` [INFO] [stdout] b0e875b286b2722760e1fa06902a184760143c4ff9a3bfa6b24137ee7ac3048e [INFO] checking james-zhang-bing/leetcode against try#f9935d29d867449445ee008640ccca1bf1ae0889+rustflags=-Dtail_expr_drop_order for crater-rollup-uwu [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjames-zhang-bing%2Fleetcode" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/james-zhang-bing/leetcode on toolchain f9935d29d867449445ee008640ccca1bf1ae0889 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f9935d29d867449445ee008640ccca1bf1ae0889" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/james-zhang-bing/leetcode [INFO] finished tweaking git repo https://github.com/james-zhang-bing/leetcode [INFO] tweaked toml for git repo https://github.com/james-zhang-bing/leetcode written to /workspace/builds/worker-7-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/james-zhang-bing/leetcode 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" "+f9935d29d867449445ee008640ccca1bf1ae0889" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+f9935d29d867449445ee008640ccca1bf1ae0889" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] eeea110f478bf4f892f41b8da1c8751c32ee39691ba191bad078a5727fe22d8c [INFO] running `Command { std: "docker" "start" "-a" "eeea110f478bf4f892f41b8da1c8751c32ee39691ba191bad078a5727fe22d8c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "eeea110f478bf4f892f41b8da1c8751c32ee39691ba191bad078a5727fe22d8c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "eeea110f478bf4f892f41b8da1c8751c32ee39691ba191bad078a5727fe22d8c", kill_on_drop: false }` [INFO] [stdout] eeea110f478bf4f892f41b8da1c8751c32ee39691ba191bad078a5727fe22d8c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail_expr_drop_order" "-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" "+f9935d29d867449445ee008640ccca1bf1ae0889" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a82f48a9780e0df8773b263d15ae8ebad690047baaaab110e7cb05d122f37af9 [INFO] running `Command { std: "docker" "start" "-a" "a82f48a9780e0df8773b263d15ae8ebad690047baaaab110e7cb05d122f37af9", kill_on_drop: false }` [INFO] [stderr] Checking leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: denote infinite loops with `loop { ... }` [INFO] [stdout] --> src/two_num_add_2.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | while true { [INFO] [stdout] | ^^^^^^^^^^ help: use `loop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(while_true)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `paris` should have an upper camel case name [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ help: convert the identifier to upper camel case: `Paris` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::iter; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 25 - let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] 25 + let mut map_wp: Vec<(usize, usize)> = vec![(0, 0); n as usize]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `wp` should have an upper camel case name [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | struct wp { [INFO] [stdout] | ^^ help: convert the identifier to upper camel case (notice the capitalization): `Wp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: denote infinite loops with `loop { ... }` [INFO] [stdout] --> src/two_num_add_2.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | while true { [INFO] [stdout] | ^^^^^^^^^^ help: use `loop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(while_true)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `paris` should have an upper camel case name [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ help: convert the identifier to upper camel case: `Paris` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::iter` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use std::iter; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around type [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 25 - let mut map_wp: Vec<((usize, usize))> = vec![(0, 0); n as usize]; [INFO] [stdout] 25 + let mut map_wp: Vec<(usize, usize)> = vec![(0, 0); n as usize]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `wp` should have an upper camel case name [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | struct wp { [INFO] [stdout] | ^^ help: convert the identifier to upper camel case (notice the capitalization): `Wp` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/str_z_convert_6.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/str_z_convert_6.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [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: `min_time` [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:85:14 [INFO] [stdout] | [INFO] [stdout] 85 | let (min_time,way_to_end)=&mut map_wp[n-1]; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_time` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> src/main.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let reference_to_nothing = dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/main.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let r=&s; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `from_vec`, and `to_vec` are never used [INFO] [stdout] --> src/merge_two_lists_21.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 15 | impl ListNode { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 16 | #[inline] [INFO] [stdout] 17 | fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | fn from_vec(vec: Vec) -> Option> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | fn to_vec(&self) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `merge_two_lists` is never used [INFO] [stdout] --> src/merge_two_lists_21.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 43 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 44 | pub fn merge_two_lists( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/merge_two_lists_21.rs:87:8 [INFO] [stdout] | [INFO] [stdout] 87 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `from_vec` and `to_vec` are never used [INFO] [stdout] --> src/two_num_add_2.rs:20:8 [INFO] [stdout] | [INFO] [stdout] 15 | impl ListNode { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | fn from_vec(vec: Vec) -> Option> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 30 | fn to_vec(&self) -> Vec { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Solution` is never used [INFO] [stdout] --> src/two_num_add_2.rs:142:11 [INFO] [stdout] | [INFO] [stdout] 142 | pub trait Solution { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `paris` is never used [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_valid` is never used [INFO] [stdout] --> src/valid_paris_20.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn is_valid(s: String) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/valid_paris_20.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_median_sorted_arrays` is never used [INFO] [stdout] --> src/find_mid_num_4.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_median_sorted_arrays(nums1: Vec, nums2: Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/find_mid_num_4.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `longest_palindrome` and `is_palindrome` are never used [INFO] [stdout] --> src/palindrome_5.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated functions in this implementation [INFO] [stdout] 9 | pub fn longest_palindrome(s: String) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 27 | fn is_palindrome(v: &[char]) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/palindrome_5.rs:39:8 [INFO] [stdout] | [INFO] [stdout] 39 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `convert` is never used [INFO] [stdout] --> src/str_z_convert_6.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn convert(s: String, num_rows: i32) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/str_z_convert_6.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `reverse` is never used [INFO] [stdout] --> src/number_reverse_7.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn reverse(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/number_reverse_7.rs:25:8 [INFO] [stdout] | [INFO] [stdout] 25 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_ocurrences` is never used [INFO] [stdout] --> src/bigram_1078.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_ocurrences(text: String, first: String, second: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/bigram_1078.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `four_sum` is never used [INFO] [stdout] --> src/sum_four_nums_18.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn four_sum(nums: Vec, target: i32) -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/sum_four_nums_18.rs:75:8 [INFO] [stdout] | [INFO] [stdout] 75 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `invert_tree` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 28 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 29 | pub fn invert_tree(root: Option>>) -> Option>> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/reversal_tree_226.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 52 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 53 | #[inline] [INFO] [stdout] 54 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `preorder_traversal` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 20 | //迭代法 [INFO] [stdout] 21 | pub fn preorder_traversal(root: Option>>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 51 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 52 | #[inline] [INFO] [stdout] 53 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyQueue` is never constructed [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct MyQueue { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, `peek`, and `empty` are never used [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl MyQueue { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 25 | [INFO] [stdout] 26 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn peek(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | fn empty(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `valid_partition` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 16 | pub fn valid_partition(nums: Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_3_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn can_cut_3_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_2_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn can_cut_2_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | struct Solution {} [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `count_paths` is never used [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 16 | pub fn count_paths(n: i32, roads: Vec>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `wp` is never constructed [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | struct wp { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/two_num_add_2.rs:137:14 [INFO] [stdout] | [INFO] [stdout] 82 | l1: Option>, [INFO] [stdout] | ------------------------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 83 | l2: Option>, [INFO] [stdout] | ------------------------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 84 | ) -> Option> { [INFO] [stdout] 85 | let n1 = match l1 { [INFO] [stdout] | -- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 86 | Some(n) => n, [INFO] [stdout] | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 89 | let n2 = match l2 { [INFO] [stdout] | -- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 90 | Some(n) => n, [INFO] [stdout] | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 94 | let mut a0 = ListNode::new(0); [INFO] [stdout] | -- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 100 | let mut n1_iter = IntoIter(*n1); [INFO] [stdout] | ------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 101 | let mut n2_iter = IntoIter(*n2); [INFO] [stdout] | ------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 137 | Some(Box::new(a0)) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] = note: requested on the command line with `-D tail-expr-drop-order` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 46 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode` (bin "leetcode") due to 2 previous errors; 46 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/str_z_convert_6.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/str_z_convert_6.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let mut i = 0; [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: `min_time` [INFO] [stdout] --> src/number_of_ways_to_arrive_at_destination_1976.rs:85:14 [INFO] [stdout] | [INFO] [stdout] 85 | let (min_time,way_to_end)=&mut map_wp[n-1]; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_min_time` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> src/main.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let reference_to_nothing = dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/main.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let r=&s; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `paris` is never used [INFO] [stdout] --> src/valid_paris_20.rs:6:6 [INFO] [stdout] | [INFO] [stdout] 6 | enum paris {} [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_median_sorted_arrays` is never used [INFO] [stdout] --> src/find_mid_num_4.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_median_sorted_arrays(nums1: Vec, nums2: Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/find_mid_num_4.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `find_ocurrences` is never used [INFO] [stdout] --> src/bigram_1078.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 9 | pub fn find_ocurrences(text: String, first: String, second: String) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/bigram_1078.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `invert_tree` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 28 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 29 | pub fn invert_tree(root: Option>>) -> Option>> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/reversal_tree_226.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/reversal_tree_226.rs:54:12 [INFO] [stdout] | [INFO] [stdout] 52 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 53 | #[inline] [INFO] [stdout] 54 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `preorder_traversal` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 20 | //迭代法 [INFO] [stdout] 21 | pub fn preorder_traversal(root: Option>>) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:42:8 [INFO] [stdout] | [INFO] [stdout] 42 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/binary_tree_preorder_traversal_144.rs:53:10 [INFO] [stdout] | [INFO] [stdout] 51 | impl TreeNode { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 52 | #[inline] [INFO] [stdout] 53 | pub fn new(val: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyQueue` is never constructed [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | struct MyQueue { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, `peek`, and `empty` are never used [INFO] [stdout] --> src/implement_queue_using_stacks232.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 24 | impl MyQueue { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 25 | [INFO] [stdout] 26 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn peek(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | fn empty(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_3_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn can_cut_3_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `can_cut_2_nums` is never used [INFO] [stdout] --> src/check_if_there_is_a_valid_partition_for_the_array_2369.rs:66:4 [INFO] [stdout] | [INFO] [stdout] 66 | fn can_cut_2_nums(nums: &Vec, current: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/two_num_add_2.rs:137:14 [INFO] [stdout] | [INFO] [stdout] 82 | l1: Option>, [INFO] [stdout] | ------------------------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 83 | l2: Option>, [INFO] [stdout] | ------------------------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 84 | ) -> Option> { [INFO] [stdout] 85 | let n1 = match l1 { [INFO] [stdout] | -- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 86 | Some(n) => n, [INFO] [stdout] | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 89 | let n2 = match l2 { [INFO] [stdout] | -- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 90 | Some(n) => n, [INFO] [stdout] | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 94 | let mut a0 = ListNode::new(0); [INFO] [stdout] | -- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 100 | let mut n1_iter = IntoIter(*n1); [INFO] [stdout] | ------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 101 | let mut n2_iter = IntoIter(*n2); [INFO] [stdout] | ------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 137 | Some(Box::new(a0)) [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] = note: requested on the command line with `-D tail-expr-drop-order` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 26 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode` (bin "leetcode" test) due to 2 previous errors; 26 warnings emitted [INFO] running `Command { std: "docker" "inspect" "a82f48a9780e0df8773b263d15ae8ebad690047baaaab110e7cb05d122f37af9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a82f48a9780e0df8773b263d15ae8ebad690047baaaab110e7cb05d122f37af9", kill_on_drop: false }` [INFO] [stdout] a82f48a9780e0df8773b263d15ae8ebad690047baaaab110e7cb05d122f37af9