[INFO] cloning repository https://github.com/DrackRamoray/leetcode-solutions-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/DrackRamoray/leetcode-solutions-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDrackRamoray%2Fleetcode-solutions-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDrackRamoray%2Fleetcode-solutions-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fc39b352ece9544f81c20b1a8712864b920954ef [INFO] building DrackRamoray/leetcode-solutions-rust against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDrackRamoray%2Fleetcode-solutions-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/DrackRamoray/leetcode-solutions-rust on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/DrackRamoray/leetcode-solutions-rust [INFO] finished tweaking git repo https://github.com/DrackRamoray/leetcode-solutions-rust [INFO] tweaked toml for git repo https://github.com/DrackRamoray/leetcode-solutions-rust written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/DrackRamoray/leetcode-solutions-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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8ec4812fdb8270cbc94e71798cb13cdfd2f5ddc9b78abf44bb2c623758699655 [INFO] running `Command { std: "docker" "start" "-a" "8ec4812fdb8270cbc94e71798cb13cdfd2f5ddc9b78abf44bb2c623758699655", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8ec4812fdb8270cbc94e71798cb13cdfd2f5ddc9b78abf44bb2c623758699655", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ec4812fdb8270cbc94e71798cb13cdfd2f5ddc9b78abf44bb2c623758699655", kill_on_drop: false }` [INFO] [stdout] 8ec4812fdb8270cbc94e71798cb13cdfd2f5ddc9b78abf44bb2c623758699655 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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 -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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1fdb717560598638b2092e276a1cbc018dbfb092f4b36e083e285031ac19b692 [INFO] running `Command { std: "docker" "start" "-a" "1fdb717560598638b2092e276a1cbc018dbfb092f4b36e083e285031ac19b692", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.137 [INFO] [stderr] Compiling assist v0.1.0 (/opt/rustwide/workdir/assist) [INFO] [stderr] Compiling easy v0.1.0 (/opt/rustwide/workdir/easy) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> easy/src/remove-duplicates-from-sorted-list/mod.rs:9:24 [INFO] [stdout] | [INFO] [stdout] 9 | while let Some(mut node) = cur.take() { [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] error: relative drop order changing in Rust 2024 [INFO] [stdout] --> easy/src/closest-binary-search-tree-value/mod.rs:17:46 [INFO] [stdout] | [INFO] [stdout] 15 | val = node.borrow().val; [INFO] [stdout] | ------------- [INFO] [stdout] | | [INFO] [stdout] | this value will be stored in a temporary; let us call it `#1` [INFO] [stdout] | `#1` will be dropped later as of Edition 2024 [INFO] [stdout] 16 | closet = if (val as f64 - target).abs() < (closet as f64 - target).abs() { val } else { closet }; [INFO] [stdout] 17 | r = if target < val as f64 { node.borrow_mut().left.take() } else { node.borrow_mut().right.take() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ - now the temporary value is dropped here, before the local variables in the block or statement [INFO] [stdout] | | [INFO] [stdout] | this value will be stored in a temporary; let us call it `#2` [INFO] [stdout] | up until Edition 2021 `#2` is dropped last but will be dropped earlier in Edition 2024 [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see [INFO] [stdout] note: `#2` invokes this custom destructor [INFO] [stdout] --> /rustc/11663cd3bfefef7d34e8f0892c250bf698049392/library/core/src/cell.rs:1804:1 [INFO] [stdout] note: `#1` invokes this custom destructor [INFO] [stdout] --> /rustc/11663cd3bfefef7d34e8f0892c250bf698049392/library/core/src/cell.rs:1434:1 [INFO] [stdout] = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages [INFO] [stdout] = note: requested on the command line with `-D tail-expr-drop-order` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: relative drop order changing in Rust 2024 [INFO] [stdout] --> easy/src/closest-binary-search-tree-value/mod.rs:17:85 [INFO] [stdout] | [INFO] [stdout] 15 | val = node.borrow().val; [INFO] [stdout] | ------------- [INFO] [stdout] | | [INFO] [stdout] | this value will be stored in a temporary; let us call it `#1` [INFO] [stdout] | `#1` will be dropped later as of Edition 2024 [INFO] [stdout] 16 | closet = if (val as f64 - target).abs() < (closet as f64 - target).abs() { val } else { closet }; [INFO] [stdout] 17 | r = if target < val as f64 { node.borrow_mut().left.take() } else { node.borrow_mut().right.take() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ - now the temporary value is dropped here, before the local variables in the block or statement [INFO] [stdout] | | [INFO] [stdout] | this value will be stored in a temporary; let us call it `#2` [INFO] [stdout] | up until Edition 2021 `#2` is dropped last but will be dropped earlier in Edition 2024 [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see [INFO] [stdout] note: `#2` invokes this custom destructor [INFO] [stdout] --> /rustc/11663cd3bfefef7d34e8f0892c250bf698049392/library/core/src/cell.rs:1804:1 [INFO] [stdout] note: `#1` invokes this custom destructor [INFO] [stdout] --> /rustc/11663cd3bfefef7d34e8f0892c250bf698049392/library/core/src/cell.rs:1434:1 [INFO] [stdout] = note: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects like releasing locks or sending messages [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cache` is never read [INFO] [stdout] --> easy/src/two-sum-iii-data-structure-design/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct TwoSum { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 4 | cache: HashMap, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add`, and `find` are never used [INFO] [stdout] --> easy/src/two-sum-iii-data-structure-design/mod.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl TwoSum { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 8 | [INFO] [stdout] 9 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | fn add(&mut self, number: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | fn find(&self, value: i32) -> bool { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `queue` is never read [INFO] [stdout] --> easy/src/implement-stack-using-queues/mod.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct MyStack { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 5 | queue: VecDeque, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, `top`, and `empty` are never used [INFO] [stdout] --> easy/src/implement-stack-using-queues/mod.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl MyStack { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 9 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | fn top(&self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | fn empty(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `s1` and `s2` are never read [INFO] [stdout] --> easy/src/implement-queue-using-stacks/mod.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct MyQueue { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 2 | s1: Vec, [INFO] [stdout] | ^^ [INFO] [stdout] 3 | s2: Vec [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `push`, `pop`, `peek`, and `empty` are never used [INFO] [stdout] --> easy/src/implement-queue-using-stacks/mod.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl MyQueue { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 7 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | fn push(&mut self, x: i32) { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | fn pop(&mut self) -> i32 { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | fn peek(&self) -> i32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 46 | fn empty(&self) -> bool { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `List` is never constructed [INFO] [stdout] --> easy/src/palindrome-linked-list/mod.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct List { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `pop`, and `into_iter` are never used [INFO] [stdout] --> easy/src/palindrome-linked-list/mod.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl List { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 8 | fn new(head: Option>) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 12 | fn pop(&mut self) -> Option { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 21 | fn into_iter(self) -> IntoIter { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `IntoIter` is never constructed [INFO] [stdout] --> easy/src/palindrome-linked-list/mod.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | struct IntoIter { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `is_palindrome` is never used [INFO] [stdout] --> easy/src/palindrome-linked-list/mod.rs:41:8 [INFO] [stdout] | [INFO] [stdout] 40 | impl Solution { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 41 | fn is_palindrome(head: Option>) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `s` is never read [INFO] [stdout] --> easy/src/range-sum-query-immutable/mod.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | pub struct NumArray { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] 2 | s: Vec [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `sum_range` are never used [INFO] [stdout] --> easy/src/range-sum-query-immutable/mod.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 5 | impl NumArray { [INFO] [stdout] | ------------- associated items in this implementation [INFO] [stdout] 6 | [INFO] [stdout] 7 | fn new(nums: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | fn sum_range(&self, left: i32, right: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `size` and `data` are never read [INFO] [stdout] --> easy/src/moving-average-from-data-stream/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct MovingAverage { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 4 | size: usize, [INFO] [stdout] | ^^^^ [INFO] [stdout] 5 | data: VecDeque, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `next` are never used [INFO] [stdout] --> easy/src/moving-average-from-data-stream/mod.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 8 | impl MovingAverage { [INFO] [stdout] | ------------------ associated items in this implementation [INFO] [stdout] 9 | [INFO] [stdout] 10 | fn new(size: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 17 | fn next(&mut self, val: i32) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `logs` is never read [INFO] [stdout] --> easy/src/logger-rate-limiter/mod.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct Logger { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 4 | logs: HashMap, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `should_print_message` are never used [INFO] [stdout] --> easy/src/logger-rate-limiter/mod.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl Logger { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 8 | [INFO] [stdout] 9 | fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | fn should_print_message(&mut self, timestamp: i32, message: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `easy` (lib) due to 2 previous errors; 17 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] running `Command { std: "docker" "inspect" "1fdb717560598638b2092e276a1cbc018dbfb092f4b36e083e285031ac19b692", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1fdb717560598638b2092e276a1cbc018dbfb092f4b36e083e285031ac19b692", kill_on_drop: false }` [INFO] [stdout] 1fdb717560598638b2092e276a1cbc018dbfb092f4b36e083e285031ac19b692