[INFO] cloning repository https://github.com/qberg/leetcode-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/qberg/leetcode-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fqberg%2Fleetcode-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fqberg%2Fleetcode-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 55a87bf20c91f5d501779b693e737c3f67cb1a19 [INFO] checking qberg/leetcode-rust against master#7606c13961ddc1174b70638e934df0439b7dc515 for pr-121979 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fqberg%2Fleetcode-rust" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/qberg/leetcode-rust on toolchain 7606c13961ddc1174b70638e934df0439b7dc515 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+7606c13961ddc1174b70638e934df0439b7dc515" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/qberg/leetcode-rust [INFO] finished tweaking git repo https://github.com/qberg/leetcode-rust [INFO] tweaked toml for git repo https://github.com/qberg/leetcode-rust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/qberg/leetcode-rust 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" "+7606c13961ddc1174b70638e934df0439b7dc515" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [ERROR] this task or one of its parent failed! [ERROR] no output for 300 seconds [ERROR] note: run with `RUST_BACKTRACE=1` to display a backtrace. [INFO] checking qberg/leetcode-rust against try#ae973628c64ab60398819bcc1fd9f08ae68ad5b5 for pr-121979 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fqberg%2Fleetcode-rust" "/workspace/builds/worker-0-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/qberg/leetcode-rust on toolchain ae973628c64ab60398819bcc1fd9f08ae68ad5b5 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ae973628c64ab60398819bcc1fd9f08ae68ad5b5" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/qberg/leetcode-rust [INFO] finished tweaking git repo https://github.com/qberg/leetcode-rust [INFO] tweaked toml for git repo https://github.com/qberg/leetcode-rust written to /workspace/builds/worker-0-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/qberg/leetcode-rust 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" "+ae973628c64ab60398819bcc1fd9f08ae68ad5b5" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+ae973628c64ab60398819bcc1fd9f08ae68ad5b5" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 89754693ebd5bd48e73a48efa0e5c2a933e6eb68719605166cf4344553ae560e [INFO] running `Command { std: "docker" "start" "-a" "89754693ebd5bd48e73a48efa0e5c2a933e6eb68719605166cf4344553ae560e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "89754693ebd5bd48e73a48efa0e5c2a933e6eb68719605166cf4344553ae560e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "89754693ebd5bd48e73a48efa0e5c2a933e6eb68719605166cf4344553ae560e", kill_on_drop: false }` [INFO] [stdout] 89754693ebd5bd48e73a48efa0e5c2a933e6eb68719605166cf4344553ae560e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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" "-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+ae973628c64ab60398819bcc1fd9f08ae68ad5b5" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9ecea1c1467e925fe49f5cf6cd6ee82adc9f7e8e76217d464a018667c4fc96e2 [INFO] running `Command { std: "docker" "start" "-a" "9ecea1c1467e925fe49f5cf6cd6ee82adc9f7e8e76217d464a018667c4fc96e2", kill_on_drop: false }` [INFO] [stderr] Checking leetcode-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0432]: unresolved import `itertools` [INFO] [stdout] --> src/solutions/p0038_count_and_say.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^ use of undeclared crate or module `itertools` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the item `FromIterator` is imported redundantly [INFO] [stdout] --> src/solutions/p1704_halves_are_alike.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::iter::FromIterator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] --> /rustc/ae973628c64ab60398819bcc1fd9f08ae68ad5b5/library/std/src/prelude/mod.rs:129:13 [INFO] [stdout] | [INFO] [stdout] = note: the item `FromIterator` is already defined here [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `itertools` [INFO] [stdout] --> src/solutions/p0038_count_and_say.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use itertools::Itertools; [INFO] [stdout] | ^^^^^^^^^ use of undeclared crate or module `itertools` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the item `FromIterator` is imported redundantly [INFO] [stdout] --> src/solutions/p1704_halves_are_alike.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::iter::FromIterator; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] --> /rustc/ae973628c64ab60398819bcc1fd9f08ae68ad5b5/library/std/src/prelude/mod.rs:129:13 [INFO] [stdout] | [INFO] [stdout] = note: the item `FromIterator` is already defined here [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn `core::str::::split_whitespace` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:3:172 [INFO] [stdout] | [INFO] [stdout] 3 | ...een Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn ` as Iterator>::collect::>` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:3:191 [INFO] [stdout] | [INFO] [stdout] 3 | ...fteen Sixteen Seventeen Eighteen Nineteen".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn `core::str::::split_whitespace` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:4:89 [INFO] [stdout] | [INFO] [stdout] 4 | const TENS: Vec<&'static str>= "Twenty Thirty Fourty Fifty Sinty Seventy Eighty Ninety".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn ` as Iterator>::collect::>` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:4:108 [INFO] [stdout] | [INFO] [stdout] 4 | const TENS: Vec<&'static str>= "Twenty Thirty Fourty Fifty Sinty Seventy Eighty Ninety".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn `core::str::::split_whitespace` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:5:72 [INFO] [stdout] | [INFO] [stdout] 5 | const HUNDREDS: Vec<&'static str> = "Hundred Thousand Million Billion".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn ` as Iterator>::collect::>` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:5:91 [INFO] [stdout] | [INFO] [stdout] 5 | const HUNDREDS: Vec<&'static str> = "Hundred Thousand Million Billion".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/solutions/p0698_can_partition_k_subsets.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | if nums.len() < k || sum % k != 0 { [INFO] [stdout] | ---------- ^ expected `usize`, found `i32` [INFO] [stdout] | | [INFO] [stdout] | expected because this is `usize` [INFO] [stdout] | [INFO] [stdout] help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit [INFO] [stdout] | [INFO] [stdout] 6 | if nums.len() < k.try_into().unwrap() || sum % k != 0 { [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/solutions/p0698_can_partition_k_subsets.rs:4:63 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn can_partition_k_subsets(nums: Vec, k: i32) -> bool { [INFO] [stdout] | ----------------------- ^^^^ expected `bool`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn `core::str::::split_whitespace` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:3:172 [INFO] [stdout] | [INFO] [stdout] 3 | ...een Fourteen Fifteen Sixteen Seventeen Eighteen Nineteen".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn ` as Iterator>::collect::>` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:3:191 [INFO] [stdout] | [INFO] [stdout] 3 | ...fteen Sixteen Seventeen Eighteen Nineteen".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn `core::str::::split_whitespace` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:4:89 [INFO] [stdout] | [INFO] [stdout] 4 | const TENS: Vec<&'static str>= "Twenty Thirty Fourty Fifty Sinty Seventy Eighty Ninety".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn ` as Iterator>::collect::>` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:4:108 [INFO] [stdout] | [INFO] [stdout] 4 | const TENS: Vec<&'static str>= "Twenty Thirty Fourty Fifty Sinty Seventy Eighty Ninety".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn `core::str::::split_whitespace` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:5:72 [INFO] [stdout] | [INFO] [stdout] 5 | const HUNDREDS: Vec<&'static str> = "Hundred Thousand Million Billion".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const fn ` as Iterator>::collect::>` in constants [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:5:91 [INFO] [stdout] | [INFO] [stdout] 5 | const HUNDREDS: Vec<&'static str> = "Hundred Thousand Million Billion".split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: calls in constants are limited to constant functions, tuple structs and tuple variants [INFO] [stdout] = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `group_by` found for struct `Chars` in the current scope [INFO] [stdout] --> src/solutions/p0038_count_and_say.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 15 | let word = to_say [INFO] [stdout] | ____________________- [INFO] [stdout] 16 | | .chars() [INFO] [stdout] 17 | | .group_by(|&c| c) [INFO] [stdout] | | -^^^^^^^^ method not found in `Chars<'_>` [INFO] [stdout] | |_____________| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/solutions/p0698_can_partition_k_subsets.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | if nums.len() < k || sum % k != 0 { [INFO] [stdout] | ---------- ^ expected `usize`, found `i32` [INFO] [stdout] | | [INFO] [stdout] | expected because this is `usize` [INFO] [stdout] | [INFO] [stdout] help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit [INFO] [stdout] | [INFO] [stdout] 6 | if nums.len() < k.try_into().unwrap() || sum % k != 0 { [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/solutions/p0698_can_partition_k_subsets.rs:4:63 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn can_partition_k_subsets(nums: Vec, k: i32) -> bool { [INFO] [stdout] | ----------------------- ^^^^ expected `bool`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `find_peak_one_dim` found for struct `p0162_find_peak_element::Solution` in the current scope [INFO] [stdout] --> src/solutions/p0162_find_peak_element.rs:31:23 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct Solution {} [INFO] [stdout] | ------------------- function or associated item `find_peak_one_dim` not found for this struct [INFO] [stdout] ... [INFO] [stdout] 31 | Solution::find_peak_one_dim(&arr), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ function or associated item not found in `Solution` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `find_peak_one_dim` found for struct `p0162_find_peak_element::Solution` in the current scope [INFO] [stdout] --> src/solutions/p0162_find_peak_element.rs:37:23 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct Solution {} [INFO] [stdout] | ------------------- function or associated item `find_peak_one_dim` not found for this struct [INFO] [stdout] ... [INFO] [stdout] 37 | Solution::find_peak_one_dim(&arr), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ function or associated item not found in `Solution` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0615]: attempted to take value of method `chars` on type `String` [INFO] [stdout] --> src/solutions/p1657_close_strings.rs:5:48 [INFO] [stdout] | [INFO] [stdout] 5 | match word1.chars().count().cmp(&word2.chars.count()) { [INFO] [stdout] | ^^^^^ method, not a field [INFO] [stdout] | [INFO] [stdout] help: use parentheses to call the method [INFO] [stdout] | [INFO] [stdout] 5 | match word1.chars().count().cmp(&word2.chars().count()) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/solutions/p1657_close_strings.rs:6:42 [INFO] [stdout] | [INFO] [stdout] 6 | std::cmp::Ordering::Equal => { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 7 | | [INFO] [stdout] 8 | | }, [INFO] [stdout] | |_____________^ expected `bool`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/solutions/p2035_minimum_difference.rs:4:32 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn minimum_difference (nums: Vec) -> i32 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mid` is never read [INFO] [stdout] --> src/solutions/p0162_find_peak_element.rs:10:17 [INFO] [stdout] | [INFO] [stdout] 10 | let mut mid = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `m` [INFO] [stdout] --> src/solutions/p1901_find_peak_grid.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let m = mat[0].len(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/solutions/p0424_character_replacement.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn character_replacement(s: String, k: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/solutions/p0424_character_replacement.rs:4:45 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn character_replacement(s: String, k: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0051_solve_n_queens.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut queens_rem = n as usize; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0052_total_n_queens.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut queens_rem = n as usize; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/solutions/p0044_is_match.rs:4:21 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn is_match(s: String, p: String) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/solutions/p0044_is_match.rs:4:32 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn is_match(s: String, p: String) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0012_integer_to_roman.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut num = num as usize; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | let mut res = String::new(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut res = String::new(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0004]: non-exhaustive patterns: `1_usize..` not covered [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | match num { [INFO] [stdout] | ^^^ pattern `1_usize..` not covered [INFO] [stdout] | [INFO] [stdout] = note: the matched value is of type `usize` [INFO] [stdout] help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown [INFO] [stdout] | [INFO] [stdout] 60 ~ }, [INFO] [stdout] 61 ~ 1_usize.. => todo!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `group_by` found for struct `Chars` in the current scope [INFO] [stdout] --> src/solutions/p0038_count_and_say.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 15 | let word = to_say [INFO] [stdout] | ____________________- [INFO] [stdout] 16 | | .chars() [INFO] [stdout] 17 | | .group_by(|&c| c) [INFO] [stdout] | | -^^^^^^^^ method not found in `Chars<'_>` [INFO] [stdout] | |_____________| [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `nums` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/solutions/p0090_subsets_ii.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | nums.sort(); [INFO] [stdout] | ^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 4 | pub fn subsets_with_dup (mut nums: Vec) -> Vec> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/solutions/p0039_combination_sum.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | let n = candidates.len(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/solutions/p0040_combination_sum_ii.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let n = candidates.len(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/solutions/p2384_largest_palindromic_number.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | let res = String::new(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/solutions/p2384_largest_palindromic_number.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | for n in (0..=9).rev(){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `v` [INFO] [stdout] --> src/solutions/p2384_largest_palindromic_number.rs:26:25 [INFO] [stdout] | [INFO] [stdout] 19 | Some(&v) => { [INFO] [stdout] | - [INFO] [stdout] | | [INFO] [stdout] | first assignment to `v` [INFO] [stdout] | help: consider making this binding mutable: `mut v` [INFO] [stdout] ... [INFO] [stdout] 26 | v -= 2; [INFO] [stdout] | ^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `img1` [INFO] [stdout] --> src/solutions/p835_image_overlap.rs:4:28 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn largest_overlap(img1: Vec>, img2: Vec>) -> i32 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_img1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `img2` [INFO] [stdout] --> src/solutions/p835_image_overlap.rs:4:49 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn largest_overlap(img1: Vec>, img2: Vec>) -> i32 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_img2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 15 previous errors; 19 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0004, E0015, E0308, E0384, E0432, E0596, E0599, E0615. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0004`. [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode-rust` (lib) due to 16 previous errors; 19 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0615]: attempted to take value of method `chars` on type `String` [INFO] [stdout] --> src/solutions/p1657_close_strings.rs:5:48 [INFO] [stdout] | [INFO] [stdout] 5 | match word1.chars().count().cmp(&word2.chars.count()) { [INFO] [stdout] | ^^^^^ method, not a field [INFO] [stdout] | [INFO] [stdout] help: use parentheses to call the method [INFO] [stdout] | [INFO] [stdout] 5 | match word1.chars().count().cmp(&word2.chars().count()) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/solutions/p1657_close_strings.rs:6:42 [INFO] [stdout] | [INFO] [stdout] 6 | std::cmp::Ordering::Equal => { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 7 | | [INFO] [stdout] 8 | | }, [INFO] [stdout] | |_____________^ expected `bool`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `nums` [INFO] [stdout] --> src/solutions/p2035_minimum_difference.rs:4:32 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn minimum_difference (nums: Vec) -> i32 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_nums` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mid` is never read [INFO] [stdout] --> src/solutions/p0162_find_peak_element.rs:10:17 [INFO] [stdout] | [INFO] [stdout] 10 | let mut mid = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `m` [INFO] [stdout] --> src/solutions/p1901_find_peak_grid.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let m = mat[0].len(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_m` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/solutions/p0424_character_replacement.rs:4:34 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn character_replacement(s: String, k: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/solutions/p0424_character_replacement.rs:4:45 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn character_replacement(s: String, k: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0051_solve_n_queens.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut queens_rem = n as usize; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0052_total_n_queens.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut queens_rem = n as usize; [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/solutions/p0044_is_match.rs:4:21 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn is_match(s: String, p: String) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/solutions/p0044_is_match.rs:4:32 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn is_match(s: String, p: String) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0012_integer_to_roman.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut num = num as usize; [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | let mut res = String::new(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut res = String::new(); [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0004]: non-exhaustive patterns: `1_usize..` not covered [INFO] [stdout] --> src/solutions/p0273_intger_to_english.rs:14:15 [INFO] [stdout] | [INFO] [stdout] 14 | match num { [INFO] [stdout] | ^^^ pattern `1_usize..` not covered [INFO] [stdout] | [INFO] [stdout] = note: the matched value is of type `usize` [INFO] [stdout] help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown [INFO] [stdout] | [INFO] [stdout] 60 ~ }, [INFO] [stdout] 61 ~ 1_usize.. => todo!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `nums` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/solutions/p0090_subsets_ii.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | nums.sort(); [INFO] [stdout] | ^^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 4 | pub fn subsets_with_dup (mut nums: Vec) -> Vec> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/solutions/p0039_combination_sum.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | let n = candidates.len(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/solutions/p0040_combination_sum_ii.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let n = candidates.len(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `res` [INFO] [stdout] --> src/solutions/p2384_largest_palindromic_number.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | let res = String::new(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_res` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/solutions/p2384_largest_palindromic_number.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | for n in (0..=9).rev(){ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `v` [INFO] [stdout] --> src/solutions/p2384_largest_palindromic_number.rs:26:25 [INFO] [stdout] | [INFO] [stdout] 19 | Some(&v) => { [INFO] [stdout] | - [INFO] [stdout] | | [INFO] [stdout] | first assignment to `v` [INFO] [stdout] | help: consider making this binding mutable: `mut v` [INFO] [stdout] ... [INFO] [stdout] 26 | v -= 2; [INFO] [stdout] | ^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `img1` [INFO] [stdout] --> src/solutions/p835_image_overlap.rs:4:28 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn largest_overlap(img1: Vec>, img2: Vec>) -> i32 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_img1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `img2` [INFO] [stdout] --> src/solutions/p835_image_overlap.rs:4:49 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn largest_overlap(img1: Vec>, img2: Vec>) -> i32 { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_img2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 17 previous errors; 19 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0004, E0015, E0308, E0384, E0432, E0596, E0599, E0615. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0004`. [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode-rust` (lib test) due to 18 previous errors; 19 warnings emitted [INFO] running `Command { std: "docker" "inspect" "9ecea1c1467e925fe49f5cf6cd6ee82adc9f7e8e76217d464a018667c4fc96e2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ecea1c1467e925fe49f5cf6cd6ee82adc9f7e8e76217d464a018667c4fc96e2", kill_on_drop: false }` [INFO] [stdout] 9ecea1c1467e925fe49f5cf6cd6ee82adc9f7e8e76217d464a018667c4fc96e2