[INFO] cloning repository https://github.com/Mimikkk/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/Mimikkk/leetcode-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMimikkk%2Fleetcode-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMimikkk%2Fleetcode-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2941394326e374a5f041780cfd6769cc43e33a34 [INFO] checking Mimikkk/leetcode-rust/2941394326e374a5f041780cfd6769cc43e33a34 against try#4d98531622e1718ae0bc3c7a1ab9cd8938428452+rustflags=-Dtail_expr_drop_order for pr-129604 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FMimikkk%2Fleetcode-rust" "/workspace/builds/worker-0-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Mimikkk/leetcode-rust on toolchain 4d98531622e1718ae0bc3c7a1ab9cd8938428452 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+4d98531622e1718ae0bc3c7a1ab9cd8938428452" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/Mimikkk/leetcode-rust [INFO] finished tweaking git repo https://github.com/Mimikkk/leetcode-rust [INFO] tweaked toml for git repo https://github.com/Mimikkk/leetcode-rust written to /workspace/builds/worker-0-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/Mimikkk/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" "+4d98531622e1718ae0bc3c7a1ab9cd8938428452" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+4d98531622e1718ae0bc3c7a1ab9cd8938428452" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 6854bf3bf48d9e3207e96b56739f978bef85a582b127a871043b90a4ddeb92e2 [INFO] running `Command { std: "docker" "start" "-a" "6854bf3bf48d9e3207e96b56739f978bef85a582b127a871043b90a4ddeb92e2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6854bf3bf48d9e3207e96b56739f978bef85a582b127a871043b90a4ddeb92e2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6854bf3bf48d9e3207e96b56739f978bef85a582b127a871043b90a4ddeb92e2", kill_on_drop: false }` [INFO] [stdout] 6854bf3bf48d9e3207e96b56739f978bef85a582b127a871043b90a4ddeb92e2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -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:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+4d98531622e1718ae0bc3c7a1ab9cd8938428452" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c64592070c19b0145fda0366a073c20369dae7e352746e5450469a7508835b2a [INFO] running `Command { std: "docker" "start" "-a" "c64592070c19b0145fda0366a073c20369dae7e352746e5450469a7508835b2a", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.86 [INFO] [stderr] Compiling getrandom v0.2.2 [INFO] [stderr] Checking ppv-lite86 v0.2.10 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking rand_core v0.6.2 [INFO] [stderr] Checking rand_chacha v0.3.0 [INFO] [stderr] Checking rand v0.8.3 [INFO] [stderr] Checking leetcode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/algorithms.rs:638:23 [INFO] [stdout] | [INFO] [stdout] 638 | pub fn find_duplicate(mut nums: Vec) -> i32 { [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: `i` [INFO] [stdout] --> src/algorithms.rs:719:10 [INFO] [stdout] | [INFO] [stdout] 719 | for (i, size) in chunk_sizes.into_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: `size` [INFO] [stdout] --> src/algorithms.rs:719:13 [INFO] [stdout] | [INFO] [stdout] 719 | for (i, size) in chunk_sizes.into_iter().enumerate() {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_size` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/algorithms.rs:791:45 [INFO] [stdout] | [INFO] [stdout] 791 | current_chars.into_iter().fold(0, |acc, mut c| acc + c.is_none() as i32) [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/algorithms.rs:778:46 [INFO] [stdout] | [INFO] [stdout] 778 | pub fn num_matching_subseq(sequence: String, mut subsequences: Vec) -> i32 { [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/algorithms/part2.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn number_of_steps(mut num: i32) -> i32 { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `val` is never read [INFO] [stdout] --> src/ghost/firstbatch.rs:46:14 [INFO] [stdout] | [INFO] [stdout] 46 | let (mut val, mut carry) = (0, false); [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 `current` is never read [INFO] [stdout] --> src/ghost/firstbatch.rs:122:40 [INFO] [stdout] | [INFO] [stdout] 122 | let (mut result, mut previous, mut current) = (0, 0, 0); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mid` is never read [INFO] [stdout] --> src/ghost/secondbatch.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let mut mid: i64 = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/traversal.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | n.as_ref().borrow().val).collect()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] = note: requested on the command line with `-D tail-expr-drop-order` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/traversal.rs:21:39 [INFO] [stdout] | [INFO] [stdout] 21 | l.into_iter().map(|n| n.as_ref().borrow().val).collect()).collect()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:251:25 [INFO] [stdout] | [INFO] [stdout] 251 | .filter(|x| x.borrow().left.is_none() && x.borrow().right.is_none()) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:251:54 [INFO] [stdout] | [INFO] [stdout] 251 | .filter(|x| x.borrow().left.is_none() && x.borrow().right.is_none()) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:256:48 [INFO] [stdout] | [INFO] [stdout] 256 | self.find_leaves().into_iter().map(|x| x.borrow().val).collect() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:278:38 [INFO] [stdout] | [INFO] [stdout] 278 | path.into_iter().map(|n| n.as_ref().borrow().val).collect()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:311:48 [INFO] [stdout] | [INFO] [stdout] 311 | self.preorder().into_iter().filter(|n| n.borrow().val == value).collect() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors; 9 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode` (bin "leetcode") due to 8 previous errors; 9 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/algorithms.rs:638:23 [INFO] [stdout] | [INFO] [stdout] 638 | pub fn find_duplicate(mut nums: Vec) -> i32 { [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: `i` [INFO] [stdout] --> src/algorithms.rs:719:10 [INFO] [stdout] | [INFO] [stdout] 719 | for (i, size) in chunk_sizes.into_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: `size` [INFO] [stdout] --> src/algorithms.rs:719:13 [INFO] [stdout] | [INFO] [stdout] 719 | for (i, size) in chunk_sizes.into_iter().enumerate() {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_size` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/algorithms.rs:791:45 [INFO] [stdout] | [INFO] [stdout] 791 | current_chars.into_iter().fold(0, |acc, mut c| acc + c.is_none() as i32) [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/algorithms.rs:778:46 [INFO] [stdout] | [INFO] [stdout] 778 | pub fn num_matching_subseq(sequence: String, mut subsequences: Vec) -> i32 { [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/algorithms/part2.rs:35:24 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn number_of_steps(mut num: i32) -> i32 { [INFO] [stdout] | ----^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `val` is never read [INFO] [stdout] --> src/ghost/firstbatch.rs:46:14 [INFO] [stdout] | [INFO] [stdout] 46 | let (mut val, mut carry) = (0, false); [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 `current` is never read [INFO] [stdout] --> src/ghost/firstbatch.rs:122:40 [INFO] [stdout] | [INFO] [stdout] 122 | let (mut result, mut previous, mut current) = (0, 0, 0); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mid` is never read [INFO] [stdout] --> src/ghost/secondbatch.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let mut mid: i64 = 0; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/traversal.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | n.as_ref().borrow().val).collect()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] = note: requested on the command line with `-D tail-expr-drop-order` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/traversal.rs:21:39 [INFO] [stdout] | [INFO] [stdout] 21 | l.into_iter().map(|n| n.as_ref().borrow().val).collect()).collect()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:251:25 [INFO] [stdout] | [INFO] [stdout] 251 | .filter(|x| x.borrow().left.is_none() && x.borrow().right.is_none()) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:251:54 [INFO] [stdout] | [INFO] [stdout] 251 | .filter(|x| x.borrow().left.is_none() && x.borrow().right.is_none()) [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:256:48 [INFO] [stdout] | [INFO] [stdout] 256 | self.find_leaves().into_iter().map(|x| x.borrow().val).collect() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:278:38 [INFO] [stdout] | [INFO] [stdout] 278 | path.into_iter().map(|n| n.as_ref().borrow().val).collect()).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> src/data_structures/tree/operations.rs:311:48 [INFO] [stdout] | [INFO] [stdout] 311 | self.preorder().into_iter().filter(|n| n.borrow().val == value).collect() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors; 9 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `leetcode` (bin "leetcode" test) due to 8 previous errors; 9 warnings emitted [INFO] running `Command { std: "docker" "inspect" "c64592070c19b0145fda0366a073c20369dae7e352746e5450469a7508835b2a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c64592070c19b0145fda0366a073c20369dae7e352746e5450469a7508835b2a", kill_on_drop: false }` [INFO] [stdout] c64592070c19b0145fda0366a073c20369dae7e352746e5450469a7508835b2a