[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] testing qberg/leetcode-rust against try#b83b707f97d809763b7861afa7638871f3339a33 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fqberg%2Fleetcode-rust" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [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-2-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/qberg/leetcode-rust on toolchain b83b707f97d809763b7861afa7638871f3339a33 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [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" "+b83b707f97d809763b7861afa7638871f3339a33" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a946e5e98e398fc151230b7abcb79fa08d056c262f29e2565b90a56e091c7d19 [INFO] running `Command { std: "docker" "start" "-a" "a946e5e98e398fc151230b7abcb79fa08d056c262f29e2565b90a56e091c7d19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a946e5e98e398fc151230b7abcb79fa08d056c262f29e2565b90a56e091c7d19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a946e5e98e398fc151230b7abcb79fa08d056c262f29e2565b90a56e091c7d19", kill_on_drop: false }` [INFO] [stdout] a946e5e98e398fc151230b7abcb79fa08d056c262f29e2565b90a56e091c7d19 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8e22beda36362ea61b11a8de41513d6adb03ff3a733402648a737e57a1a7cada [INFO] running `Command { std: "docker" "start" "-a" "8e22beda36362ea61b11a8de41513d6adb03ff3a733402648a737e57a1a7cada", kill_on_drop: false }` [INFO] [stderr] Compiling 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 unresolved module or unlinked crate `itertools` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `itertools`, use `cargo add itertools` to add it to your `Cargo.toml` [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 method named `group_by` found for struct `Chars<'a>` 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[E0015]: cannot call non-const method `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 method ` 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] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const method `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 method ` 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] [INFO] [stdout] [INFO] [stdout] error[E0015]: cannot call non-const method `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 method ` 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] [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)]` (part of `#[warn(unused)]`) 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)]` (part of `#[warn(unused)]`) 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)]` (part of `#[warn(unused)]`) 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] | - first assignment to `v` [INFO] [stdout] ... [INFO] [stdout] 26 | v -= 2; [INFO] [stdout] | ^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 19 | Some(&mut v) => { [INFO] [stdout] | +++ [INFO] [stdout] help: to modify the original value, take a borrow instead [INFO] [stdout] | [INFO] [stdout] 19 | Some(&ref mut v) => { [INFO] [stdout] | +++++++ [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] 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 15 previous errors; 18 warnings emitted [INFO] running `Command { std: "docker" "inspect" "8e22beda36362ea61b11a8de41513d6adb03ff3a733402648a737e57a1a7cada", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8e22beda36362ea61b11a8de41513d6adb03ff3a733402648a737e57a1a7cada", kill_on_drop: false }` [INFO] [stdout] 8e22beda36362ea61b11a8de41513d6adb03ff3a733402648a737e57a1a7cada