[INFO] cloning repository https://github.com/weixinZhang12/rust_practice [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/weixinZhang12/rust_practice" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FweixinZhang12%2Frust_practice", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FweixinZhang12%2Frust_practice'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b3032edbd680222a6155c1fd5a1ab12fa4376bd1 [INFO] building weixinZhang12/rust_practice against try#9b5e8b16bd1c4acf4cf8e6880368314cf021a987+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FweixinZhang12%2Frust_practice" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/weixinZhang12/rust_practice on toolchain 9b5e8b16bd1c4acf4cf8e6880368314cf021a987 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/weixinZhang12/rust_practice [INFO] finished tweaking git repo https://github.com/weixinZhang12/rust_practice [INFO] tweaked toml for git repo https://github.com/weixinZhang12/rust_practice written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/weixinZhang12/rust_practice 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" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "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 [ERROR] error running command: no output for 300 seconds [INFO] building weixinZhang12/rust_practice against try#9b5e8b16bd1c4acf4cf8e6880368314cf021a987+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FweixinZhang12%2Frust_practice" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/weixinZhang12/rust_practice on toolchain 9b5e8b16bd1c4acf4cf8e6880368314cf021a987 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/weixinZhang12/rust_practice [INFO] finished tweaking git repo https://github.com/weixinZhang12/rust_practice [INFO] tweaked toml for git repo https://github.com/weixinZhang12/rust_practice written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/weixinZhang12/rust_practice 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" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "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-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2094293a439b94809e7066c634b52c7860257db472ddf9a823624beb5cf1046f [INFO] running `Command { std: "docker" "start" "-a" "2094293a439b94809e7066c634b52c7860257db472ddf9a823624beb5cf1046f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2094293a439b94809e7066c634b52c7860257db472ddf9a823624beb5cf1046f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2094293a439b94809e7066c634b52c7860257db472ddf9a823624beb5cf1046f", kill_on_drop: false }` [INFO] [stdout] 2094293a439b94809e7066c634b52c7860257db472ddf9a823624beb5cf1046f [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 -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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9859bfd7008ded5204dbaf4ccb0ebcc82001bdd2055533bb558320158040d2a4 [INFO] running `Command { std: "docker" "start" "-a" "9859bfd7008ded5204dbaf4ccb0ebcc82001bdd2055533bb558320158040d2a4", kill_on_drop: false }` [INFO] [stderr] Compiling lazy_static v1.5.0 [INFO] [stderr] Compiling colored v2.1.0 [INFO] [stderr] Compiling rust_practice v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `l20`, `l26`, `l441`, and `l70` [INFO] [stdout] --> src/main.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use leetcode::{l20, l26, l268, l441, l70}; [INFO] [stdout] | ^^^ ^^^ ^^^^ ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/leetcode/l283.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length` [INFO] [stdout] --> src/leetcode/l14.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let length=strs.len(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_length` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `temp` is never read [INFO] [stdout] --> src/leetcode/l283.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut temp = 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: value assigned to `length` is never read [INFO] [stdout] --> src/leetcode/l7.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | let mut length: usize = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/leetcode/l69.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn my_sqrt(x: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/leetcode/l67.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let mut s = v.iter().map(|n| n.to_string()).collect(); [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: `shang` [INFO] [stdout] --> src/leetcode/l168.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut shang = -1; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_shang` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `yushu` is never read [INFO] [stdout] --> src/leetcode/l168.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let mut yushu = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/leetcode/l168.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let mut shang = -1; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/leetcode/l168.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let mut c:String=yushu_arr.iter().map(|&n|(n as u8 +b'A'-1) as char).collect(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mid` is never read [INFO] [stdout] --> src/leetcode/l35.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut mid: usize = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/leetcode/l118.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | for i in 0..num_rows { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/leetcode/l217.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | Some(v) => return true, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let mut array = vec![0,1]; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_nums` is never used [INFO] [stdout] --> src/leetcode/l1.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn two_nums(nums: Vec, target: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `roman_to_int` is never used [INFO] [stdout] --> src/leetcode/l13.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn roman_to_int(s: String)->i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest_comon_prefix` is never used [INFO] [stdout] --> src/leetcode/l14.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn longest_comon_prefix(strs: Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_vaild` is never used [INFO] [stdout] --> src/leetcode/l20.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn is_vaild(s: String) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates` is never used [INFO] [stdout] --> src/leetcode/l26.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn remove_duplicates(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_element` is never used [INFO] [stdout] --> src/leetcode/l27.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn remove_element(nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_zeroes` is never used [INFO] [stdout] --> src/leetcode/l283.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn move_zeroes(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `losing_player` is never used [INFO] [stdout] --> src/leetcode/l3222.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn losing_player(x: i32, y: i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `judge_square_sum` is never used [INFO] [stdout] --> src/leetcode/l633.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn judge_square_sum(c: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reverse` is never used [INFO] [stdout] --> src/leetcode/l7.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn reverse(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_palindrome` is never used [INFO] [stdout] --> src/leetcode/l9.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn is_palindrome(x: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `str_str` is never used [INFO] [stdout] --> src/leetcode/l28.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn str_str(haystack: String, needle: String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `length_of_last_word` is never used [INFO] [stdout] --> src/leetcode/l58.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn length_of_last_word(s: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `plus_one` is never used [INFO] [stdout] --> src/leetcode/l66.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn plus_one(digits: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `my_sqrt` is never used [INFO] [stdout] --> src/leetcode/l69.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn my_sqrt(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `single_non_duplicate` is never used [INFO] [stdout] --> src/leetcode/l540.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn single_non_duplicate(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_binary` is never used [INFO] [stdout] --> src/leetcode/l67.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn add_binary(a: String, b: String) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `single_number` is never used [INFO] [stdout] --> src/leetcode/l136.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn single_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convert_to_title` is never used [INFO] [stdout] --> src/leetcode/l168.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn convert_to_title(column_number: i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `search_insert` is never used [INFO] [stdout] --> src/leetcode/l35.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn search_insert(nums: Vec, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `merge` is never used [INFO] [stdout] --> src/leetcode/l88.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn merge(nums1: &mut Vec, m: i32, nums2: &mut Vec, n: i32) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate` is never used [INFO] [stdout] --> src/leetcode/l118.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn generate(num_rows: i32) -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `contains_duplicate` is never used [INFO] [stdout] --> src/leetcode/l217.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn contains_duplicate(nums: Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `word_pattern` is never used [INFO] [stdout] --> src/leetcode/l290.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn word_pattern(pattern: String, s: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `third_max` is never used [INFO] [stdout] --> src/leetcode/l414.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn third_max(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `arrange_coins` is never used [INFO] [stdout] --> src/leetcode/l441.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn arrange_coins(n: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `L` is never used [INFO] [stdout] --> src/leetcode/l70.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn L(n: i32,v:& mut Vec) -> i32 { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `climb_stairs` is never used [INFO] [stdout] --> src/leetcode/l70.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn climb_stairs(n: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `L` should have a snake case name [INFO] [stdout] --> src/leetcode/l70.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn L(n: i32,v:& mut Vec) -> i32 { [INFO] [stdout] | ^ help: convert the identifier to snake case: `l` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.58s [INFO] running `Command { std: "docker" "inspect" "9859bfd7008ded5204dbaf4ccb0ebcc82001bdd2055533bb558320158040d2a4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9859bfd7008ded5204dbaf4ccb0ebcc82001bdd2055533bb558320158040d2a4", kill_on_drop: false }` [INFO] [stdout] 9859bfd7008ded5204dbaf4ccb0ebcc82001bdd2055533bb558320158040d2a4 [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 -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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+9b5e8b16bd1c4acf4cf8e6880368314cf021a987" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8ff85cb1ee28a0dcc7b040f5e03d4010422ab4f4084cfc9df3853c55be8fecdc [INFO] running `Command { std: "docker" "start" "-a" "8ff85cb1ee28a0dcc7b040f5e03d4010422ab4f4084cfc9df3853c55be8fecdc", kill_on_drop: false }` [INFO] [stderr] Compiling rust_practice v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `l20`, `l26`, `l441`, and `l70` [INFO] [stdout] --> src/main.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use leetcode::{l20, l26, l268, l441, l70}; [INFO] [stdout] | ^^^ ^^^ ^^^^ ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/leetcode/l283.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `length` [INFO] [stdout] --> src/leetcode/l14.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let length=strs.len(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_length` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `temp` is never read [INFO] [stdout] --> src/leetcode/l283.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut temp = 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: value assigned to `length` is never read [INFO] [stdout] --> src/leetcode/l7.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | let mut length: usize = 0; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/leetcode/l69.rs:1:20 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn my_sqrt(x: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/leetcode/l67.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | let mut s = v.iter().map(|n| n.to_string()).collect(); [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: `shang` [INFO] [stdout] --> src/leetcode/l168.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut shang = -1; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_shang` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `yushu` is never read [INFO] [stdout] --> src/leetcode/l168.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let mut yushu = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/leetcode/l168.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let mut shang = -1; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/leetcode/l168.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let mut c:String=yushu_arr.iter().map(|&n|(n as u8 +b'A'-1) as char).collect(); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mid` is never read [INFO] [stdout] --> src/leetcode/l35.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut mid: usize = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/leetcode/l118.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | for i in 0..num_rows { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/leetcode/l217.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | Some(v) => return true, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let mut array = vec![0,1]; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_nums` is never used [INFO] [stdout] --> src/leetcode/l1.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn two_nums(nums: Vec, target: i32) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `roman_to_int` is never used [INFO] [stdout] --> src/leetcode/l13.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn roman_to_int(s: String)->i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest_comon_prefix` is never used [INFO] [stdout] --> src/leetcode/l14.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn longest_comon_prefix(strs: Vec) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_vaild` is never used [INFO] [stdout] --> src/leetcode/l20.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn is_vaild(s: String) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_duplicates` is never used [INFO] [stdout] --> src/leetcode/l26.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn remove_duplicates(nums: &mut Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `remove_element` is never used [INFO] [stdout] --> src/leetcode/l27.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn remove_element(nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_zeroes` is never used [INFO] [stdout] --> src/leetcode/l283.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn move_zeroes(nums: &mut Vec) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `losing_player` is never used [INFO] [stdout] --> src/leetcode/l3222.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn losing_player(x: i32, y: i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `judge_square_sum` is never used [INFO] [stdout] --> src/leetcode/l633.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn judge_square_sum(c: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reverse` is never used [INFO] [stdout] --> src/leetcode/l7.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn reverse(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `is_palindrome` is never used [INFO] [stdout] --> src/leetcode/l9.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn is_palindrome(x: i32) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `str_str` is never used [INFO] [stdout] --> src/leetcode/l28.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn str_str(haystack: String, needle: String) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `length_of_last_word` is never used [INFO] [stdout] --> src/leetcode/l58.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn length_of_last_word(s: String) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `plus_one` is never used [INFO] [stdout] --> src/leetcode/l66.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn plus_one(digits: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `my_sqrt` is never used [INFO] [stdout] --> src/leetcode/l69.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn my_sqrt(x: i32) -> i32 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `single_non_duplicate` is never used [INFO] [stdout] --> src/leetcode/l540.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn single_non_duplicate(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_binary` is never used [INFO] [stdout] --> src/leetcode/l67.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn add_binary(a: String, b: String) -> String { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `single_number` is never used [INFO] [stdout] --> src/leetcode/l136.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn single_number(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `convert_to_title` is never used [INFO] [stdout] --> src/leetcode/l168.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn convert_to_title(column_number: i32) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `search_insert` is never used [INFO] [stdout] --> src/leetcode/l35.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn search_insert(nums: Vec, target: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `merge` is never used [INFO] [stdout] --> src/leetcode/l88.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn merge(nums1: &mut Vec, m: i32, nums2: &mut Vec, n: i32) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate` is never used [INFO] [stdout] --> src/leetcode/l118.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn generate(num_rows: i32) -> Vec> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `contains_duplicate` is never used [INFO] [stdout] --> src/leetcode/l217.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn contains_duplicate(nums: Vec) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `word_pattern` is never used [INFO] [stdout] --> src/leetcode/l290.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn word_pattern(pattern: String, s: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `third_max` is never used [INFO] [stdout] --> src/leetcode/l414.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn third_max(nums: Vec) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `arrange_coins` is never used [INFO] [stdout] --> src/leetcode/l441.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn arrange_coins(n: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `L` is never used [INFO] [stdout] --> src/leetcode/l70.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn L(n: i32,v:& mut Vec) -> i32 { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `climb_stairs` is never used [INFO] [stdout] --> src/leetcode/l70.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn climb_stairs(n: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `L` should have a snake case name [INFO] [stdout] --> src/leetcode/l70.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn L(n: i32,v:& mut Vec) -> i32 { [INFO] [stdout] | ^ help: convert the identifier to snake case: `l` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s [INFO] running `Command { std: "docker" "inspect" "8ff85cb1ee28a0dcc7b040f5e03d4010422ab4f4084cfc9df3853c55be8fecdc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ff85cb1ee28a0dcc7b040f5e03d4010422ab4f4084cfc9df3853c55be8fecdc", kill_on_drop: false }` [INFO] [stdout] 8ff85cb1ee28a0dcc7b040f5e03d4010422ab4f4084cfc9df3853c55be8fecdc