[INFO] cloning repository https://github.com/U-yammer/rust-leetCode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/U-yammer/rust-leetCode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FU-yammer%2Frust-leetCode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FU-yammer%2Frust-leetCode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e2c3c8ec31ba4593dca8f7db071ca7d2b65b68e5 [INFO] checking U-yammer/rust-leetCode/e2c3c8ec31ba4593dca8f7db071ca7d2b65b68e5 against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FU-yammer%2Frust-leetCode" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/U-yammer/rust-leetCode on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/U-yammer/rust-leetCode [INFO] finished tweaking git repo https://github.com/U-yammer/rust-leetCode [INFO] tweaked toml for git repo https://github.com/U-yammer/rust-leetCode written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/U-yammer/rust-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" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5b3e6afa781f78d93a32e47bca07fb80cbed85c046631d56ae5ba892dfcfedea [INFO] running `Command { std: "docker" "start" "-a" "5b3e6afa781f78d93a32e47bca07fb80cbed85c046631d56ae5ba892dfcfedea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5b3e6afa781f78d93a32e47bca07fb80cbed85c046631d56ae5ba892dfcfedea", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5b3e6afa781f78d93a32e47bca07fb80cbed85c046631d56ae5ba892dfcfedea", kill_on_drop: false }` [INFO] [stdout] 5b3e6afa781f78d93a32e47bca07fb80cbed85c046631d56ae5ba892dfcfedea [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 04d72b0730943b72cf41a925982b98fdf391c618f69c1d1584fd170e23df8e72 [INFO] running `Command { std: "docker" "start" "-a" "04d72b0730943b72cf41a925982b98fdf391c618f69c1d1584fd170e23df8e72", kill_on_drop: false }` [INFO] [stderr] Checking leetCode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: type `inter` should have an upper camel case name [INFO] [stdout] --> src/inter_mut.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct inter { [INFO] [stdout] | ^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inter` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/array/delete.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [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/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::BorrowMut` [INFO] [stdout] --> src/main.rs:7:11 [INFO] [stdout] | [INFO] [stdout] 7 | use std::{borrow::BorrowMut}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::MyBox` [INFO] [stdout] --> src/my_box.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | use super::MyBox; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `inter` should have an upper camel case name [INFO] [stdout] --> src/inter_mut.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct inter { [INFO] [stdout] | ^^^^^ help: convert the identifier to upper camel case (notice the capitalization): `Inter` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> src/array/delete.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [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/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::BorrowMut` [INFO] [stdout] --> src/main.rs:7:11 [INFO] [stdout] | [INFO] [stdout] 7 | use std::{borrow::BorrowMut}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> examples/valid_mountain.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | for (i, &e) in arr.iter().enumerate() { [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: unused variable: `x` [INFO] [stdout] --> examples/028_find_the_index.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let x = Solution::str_str("abc".to_owned(), "c".to_owned()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/rc.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let b = Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `f` in this scope [INFO] [stdout] --> examples/linked_list.rs:61:45 [INFO] [stdout] | [INFO] [stdout] 61 | let mut current = self.head.or_else(f); [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `l2_vec` in this scope [INFO] [stdout] --> examples/02_add_two_num.rs:18:59 [INFO] [stdout] | [INFO] [stdout] 18 | let sum = Self::get_sum(&l1_vec) + Self::get_sum(&l2_vec); [INFO] [stdout] | ^^^^^^ help: a local variable with a similar name exists: `l1_vec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> examples/linked_list.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> examples/test.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | let s = Solution; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `remove_element` is never used [INFO] [stdout] --> examples/test.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 3 | impl Solution { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] 4 | pub fn remove_element(self, nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/rc.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::borrow::Borrow` [INFO] [stdout] --> examples/02_add_two_num.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::borrow::Borrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyCircularQueue` is never constructed [INFO] [stdout] --> src/queue.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct MyCircularQueue { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> examples/linked_list.rs:30:23 [INFO] [stdout] | [INFO] [stdout] 30 | fn get(&mut self, index: i32) -> i32 { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/queue.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl MyCircularQueue { [INFO] [stdout] | -------------------- associated items in this implementation [INFO] [stdout] 10 | pub fn new(k: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn en_queue(&mut self, value: i32) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | fn next_tail(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn next_head(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn de_queue(&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn front(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub fn rear(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn is_full(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 90 | fn print_self(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `inter` is never constructed [INFO] [stdout] --> src/inter_mut.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct inter { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/inter_mut.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/array/delete.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `remove_element` is never used [INFO] [stdout] --> src/array/delete.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 6 | pub fn remove_element(nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> examples/linked_list.rs:77:28 [INFO] [stdout] | [INFO] [stdout] 77 | fn add_at_index(&self, index: i32, val: i32) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/my_box.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MyBox` is never constructed [INFO] [stdout] --> src/my_box.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | struct MyBox(T); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/my_box.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 21 | impl MyBox { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 22 | fn new(x: T) -> MyBox { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/rc.rs:1:6 [INFO] [stdout] | [INFO] [stdout] 1 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/rc.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `val` [INFO] [stdout] --> examples/linked_list.rs:77:40 [INFO] [stdout] | [INFO] [stdout] 77 | fn add_at_index(&self, index: i32, val: i32) { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_val` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> examples/linked_list.rs:81:31 [INFO] [stdout] | [INFO] [stdout] 81 | fn delete_at_index(&self, index: i32) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/queue.rs:101:17 [INFO] [stdout] | [INFO] [stdout] 101 | let mut x = MyCircularQueue::new(3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [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/queue.rs:101:13 [INFO] [stdout] | [INFO] [stdout] 101 | let mut x = MyCircularQueue::new(3); [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: `x` [INFO] [stdout] --> src/test.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let mut x = MyCircularQueue::new(3); [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/test.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let mut x = MyCircularQueue::new(3); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/rc.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let b = Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetCode` (example "linked_list") due to 2 previous errors; 5 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/rc.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `array`, `size`, `head`, and `tail` are never read [INFO] [stdout] --> src/queue.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct MyCircularQueue { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 3 | array: Vec, // 静的配列は動的に配列の長さを指定することができないので、 [INFO] [stdout] | ^^^^^ [INFO] [stdout] 4 | size: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] 5 | head: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] 6 | tail: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/queue.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl MyCircularQueue { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn en_queue(&mut self, value: i32) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 31 | fn next_tail(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 39 | fn next_head(&mut self) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 47 | pub fn de_queue(&mut self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | pub fn front(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 65 | pub fn rear(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 69 | pub fn is_empty(&self) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn is_full(&self) -> bool { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 90 | fn print_self(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `inter` is never constructed [INFO] [stdout] --> src/inter_mut.rs:3:12 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct inter { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/inter_mut.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetCode` (example "02_add_two_num") due to 2 previous errors; 1 warning emitted [INFO] [stdout] warning: struct `Solution` is never constructed [INFO] [stdout] --> src/array/delete.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Solution; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `remove_element` is never used [INFO] [stdout] --> src/array/delete.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 5 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 6 | pub fn remove_element(nums: &mut Vec, val: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/my_box.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/rc.rs:1:6 [INFO] [stdout] | [INFO] [stdout] 1 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 18 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/add_two.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn two_sum(nums: Vec, target: i32) -> Vec { [INFO] [stdout] | -------- expected `Vec` because of return type [INFO] [stdout] ... [INFO] [stdout] 13 | v.push(i); [INFO] [stdout] | - - this argument has type `usize`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `v` to have type `Vec` [INFO] [stdout] ... [INFO] [stdout] 19 | v [INFO] [stdout] | ^ expected `Vec`, found `Vec` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found struct `Vec` [INFO] [stdout] help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit [INFO] [stdout] | [INFO] [stdout] 13 | v.push(i.try_into().unwrap()); [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/rc.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 19 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetCode` (example "add_two") due to 2 previous errors [INFO] running `Command { std: "docker" "inspect" "04d72b0730943b72cf41a925982b98fdf391c618f69c1d1584fd170e23df8e72", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "04d72b0730943b72cf41a925982b98fdf391c618f69c1d1584fd170e23df8e72", kill_on_drop: false }` [INFO] [stdout] 04d72b0730943b72cf41a925982b98fdf391c618f69c1d1584fd170e23df8e72