[INFO] cloning repository https://github.com/tetsu-sh/algorithm [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tetsu-sh/algorithm" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftetsu-sh%2Falgorithm", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftetsu-sh%2Falgorithm'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2655f2c5cc81c27f8bcaefcc47fe2f02f152b21a [INFO] testing tetsu-sh/algorithm against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftetsu-sh%2Falgorithm" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/tetsu-sh/algorithm [INFO] finished tweaking git repo https://github.com/tetsu-sh/algorithm [INFO] tweaked toml for git repo https://github.com/tetsu-sh/algorithm written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tetsu-sh/algorithm on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/tetsu-sh/algorithm 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" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded proconio v0.3.8 [INFO] [stderr] Downloaded clap_derive v4.0.13 [INFO] [stderr] Downloaded proconio v0.4.3 [INFO] [stderr] Downloaded clap v4.0.15 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 590e3c82e1cb6460c32b225c19221059df053fd61c32f610e3c157c67c5683f4 [INFO] running `Command { std: "docker" "start" "-a" "590e3c82e1cb6460c32b225c19221059df053fd61c32f610e3c157c67c5683f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "590e3c82e1cb6460c32b225c19221059df053fd61c32f610e3c157c67c5683f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "590e3c82e1cb6460c32b225c19221059df053fd61c32f610e3c157c67c5683f4", kill_on_drop: false }` [INFO] [stdout] 590e3c82e1cb6460c32b225c19221059df053fd61c32f610e3c157c67c5683f4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 296f31da442f7f85aa3c49a78ed6d0a15c60d28f6b618dfa34a0d22d6d9543b4 [INFO] running `Command { std: "docker" "start" "-a" "296f31da442f7f85aa3c49a78ed6d0a15c60d28f6b618dfa34a0d22d6d9543b4", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling ppv-lite86 v0.2.16 [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Compiling proconio v0.3.8 [INFO] [stderr] Compiling getrandom v0.2.7 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling algorithm v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections` [INFO] [stdout] --> src/leetcode.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::collections; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `&_` [INFO] [stdout] --> src/leetcode.rs:158:21 [INFO] [stdout] | [INFO] [stdout] 158 | let node=node.borrow(); [INFO] [stdout] | ^^^^ [INFO] [stdout] 159 | let left=dpt(node.left.clone(),current_depth+1); [INFO] [stdout] | --------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `node` an explicit type, where the type for type parameter `Borrowed` is specified [INFO] [stdout] | [INFO] [stdout] 158 | let node: &Borrowed=node.borrow(); [INFO] [stdout] | +++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `(&_, &_)` [INFO] [stdout] --> src/leetcode.rs:176:21 [INFO] [stdout] | [INFO] [stdout] 176 | let (node1,node2)=(node1.borrow(),node2.borrow()); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 177 | let mut root=TreeNode::new(node1.val+node2.val); [INFO] [stdout] | --------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving this pattern a type, where the type for type parameter `Borrowed` is specified [INFO] [stdout] | [INFO] [stdout] 176 | let (node1,node2): (&Borrowed, &Borrowed)=(node1.borrow(),node2.borrow()); [INFO] [stdout] | ++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/leetcode.rs:206:51 [INFO] [stdout] | [INFO] [stdout] 206 | fn longest_increasing_subsequence(nums:Vec)->i32{ [INFO] [stdout] | ------------------------------ ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `answer` [INFO] [stdout] | [INFO] [stdout] 218 ~ ; [INFO] [stdout] 219 + answer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `node` is never read [INFO] [stdout] --> src/leetcode.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 197 | node=next; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value [INFO] [stdout] --> src/leetcode.rs:193:20 [INFO] [stdout] | [INFO] [stdout] 193 | while let Some(node)=node{ [INFO] [stdout] | ^^^^ value moved here, in previous iteration of loop [INFO] [stdout] | [INFO] [stdout] = note: move occurs because value has type `Box`, which does not implement the `Copy` trait [INFO] [stdout] help: borrow this binding in the pattern to avoid moving the value [INFO] [stdout] | [INFO] [stdout] 193 | while let Some(ref node)=node{ [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `prev` [INFO] [stdout] --> src/leetcode.rs:196:17 [INFO] [stdout] | [INFO] [stdout] 191 | let prev=None; [INFO] [stdout] | ---- first assignment to `prev` [INFO] [stdout] ... [INFO] [stdout] 196 | prev=Some(node.clone()); [INFO] [stdout] | ^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 191 | let mut prev=None; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of partially moved value: `node` [INFO] [stdout] --> src/leetcode.rs:196:27 [INFO] [stdout] | [INFO] [stdout] 194 | if let Some(next)=node.next{ [INFO] [stdout] | ---- value partially moved here [INFO] [stdout] 195 | if node.val==next.val{ [INFO] [stdout] 196 | prev=Some(node.clone()); [INFO] [stdout] | ^^^^ value borrowed here after partial move [INFO] [stdout] | [INFO] [stdout] = note: partial move occurs because value has type `Box`, which does not implement the `Copy` trait [INFO] [stdout] help: borrow this binding in the pattern to avoid moving the value [INFO] [stdout] | [INFO] [stdout] 194 | if let Some(ref next)=node.next{ [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `node` [INFO] [stdout] --> src/leetcode.rs:197:17 [INFO] [stdout] | [INFO] [stdout] 193 | while let Some(node)=node{ [INFO] [stdout] | ---- first assignment to `node` [INFO] [stdout] ... [INFO] [stdout] 197 | node=next; [INFO] [stdout] | ^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 193 | while let Some(mut node)=node{ [INFO] [stdout] | +++ [INFO] [stdout] help: to modify the original value, take a borrow instead [INFO] [stdout] | [INFO] [stdout] 193 | while let Some(ref mut node)=node{ [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0282, E0308, E0382, E0384. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0282`. [INFO] [stdout] [INFO] [stderr] error: could not compile `algorithm` (bin "leetcode") due to 7 previous errors; 2 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] running `Command { std: "docker" "inspect" "296f31da442f7f85aa3c49a78ed6d0a15c60d28f6b618dfa34a0d22d6d9543b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "296f31da442f7f85aa3c49a78ed6d0a15c60d28f6b618dfa34a0d22d6d9543b4", kill_on_drop: false }` [INFO] [stdout] 296f31da442f7f85aa3c49a78ed6d0a15c60d28f6b618dfa34a0d22d6d9543b4