[INFO] cloning repository https://github.com/mirite/rust-parser [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mirite/rust-parser" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmirite%2Frust-parser", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmirite%2Frust-parser'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b5d7c26a1f106bd2cf3e937d0149ffd9a66c07e8 [INFO] testing mirite/rust-parser against master#1f7f8ea0721a3b1eb73e6c6d25cccb371434b320 for pr-154065-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmirite%2Frust-parser" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mirite/rust-parser [INFO] finished tweaking git repo https://github.com/mirite/rust-parser [INFO] tweaked toml for git repo https://github.com/mirite/rust-parser written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mirite/rust-parser on toolchain 1f7f8ea0721a3b1eb73e6c6d25cccb371434b320 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1f7f8ea0721a3b1eb73e6c6d25cccb371434b320" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/mirite/rust-parser 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" "+1f7f8ea0721a3b1eb73e6c6d25cccb371434b320" "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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+1f7f8ea0721a3b1eb73e6c6d25cccb371434b320" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e2b88e3157b19d94ce6fe023399c3548c284ef130f1d3e4f6fb8b15a89006b11 [INFO] running `Command { std: "docker" "start" "-a" "e2b88e3157b19d94ce6fe023399c3548c284ef130f1d3e4f6fb8b15a89006b11", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e2b88e3157b19d94ce6fe023399c3548c284ef130f1d3e4f6fb8b15a89006b11", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e2b88e3157b19d94ce6fe023399c3548c284ef130f1d3e4f6fb8b15a89006b11", kill_on_drop: false }` [INFO] [stdout] e2b88e3157b19d94ce6fe023399c3548c284ef130f1d3e4f6fb8b15a89006b11 [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+1f7f8ea0721a3b1eb73e6c6d25cccb371434b320" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ee1fe9a1cbee6e7e007bece8c0153765b51779e8209f622c95e4c187a91d7bdb [INFO] running `Command { std: "docker" "start" "-a" "ee1fe9a1cbee6e7e007bece8c0153765b51779e8209f622c95e4c187a91d7bdb", kill_on_drop: false }` [INFO] [stderr] Compiling rust-parser v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0596]: cannot borrow `last_open.children` as mutable, as it is behind a `&` reference [INFO] [stdout] --> src/tree.rs:25:13 [INFO] [stdout] | [INFO] [stdout] 25 | last_open.children.push(node); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ `last_open` is a `&` reference, so it cannot be borrowed as mutable [INFO] [stdout] | [INFO] [stdout] help: consider specifying this binding's type [INFO] [stdout] | [INFO] [stdout] 24 | let last_open: &mut &mut Tree = open_tags.last().unwrap(); [INFO] [stdout] | ++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return reference to local variable `node` [INFO] [stdout] --> src/tree.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | &mut node [INFO] [stdout] | ^^^^^^^^^ returns a reference to data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `node` [INFO] [stdout] --> src/tree.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 17 | let mut node = Tree { [INFO] [stdout] | -------- move occurs because `node` has type `Tree`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 22 | tree.push(node); [INFO] [stdout] | ---- value moved here [INFO] [stdout] ... [INFO] [stdout] 25 | last_open.children.push(node); [INFO] [stdout] | ---- value moved here [INFO] [stdout] 26 | } [INFO] [stdout] 27 | &mut node [INFO] [stdout] | ^^^^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: if `Tree` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/tree.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tree { [INFO] [stdout] | ^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 25 | last_open.children.push(node); [INFO] [stdout] | ---- you could clone this value [INFO] [stdout] note: if `Tree` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/tree.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Tree { [INFO] [stdout] | ^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 22 | tree.push(node); [INFO] [stdout] | ---- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `add_to_last_open` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/tree.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let add_to_last_open = |token: &Token| -> &mut Tree { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not mutable [INFO] [stdout] ... [INFO] [stdout] 22 | tree.push(node); [INFO] [stdout] | ---- calling `add_to_last_open` requires mutable binding due to mutable borrow of `tree` [INFO] [stdout] ... [INFO] [stdout] 35 | add_to_last_open(token); [INFO] [stdout] | ---------------- cannot borrow as mutable [INFO] [stdout] ... [INFO] [stdout] 38 | add_to_last_open(token); [INFO] [stdout] | ---------------- cannot borrow as mutable [INFO] [stdout] ... [INFO] [stdout] 41 | let new_tree = add_to_last_open(token); [INFO] [stdout] | ---------------- cannot borrow as mutable [INFO] [stdout] ... [INFO] [stdout] 57 | add_to_last_open(token); [INFO] [stdout] | ---------------- cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 16 | let mut add_to_last_open = |token: &Token| -> &mut Tree { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `open_tags` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/tree.rs:42:21 [INFO] [stdout] | [INFO] [stdout] 16 | let add_to_last_open = |token: &Token| -> &mut Tree { [INFO] [stdout] | ---------------------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 21 | if open_tags.len() == 0 { [INFO] [stdout] | --------- first borrow occurs due to use of `open_tags` in closure [INFO] [stdout] ... [INFO] [stdout] 42 | open_tags.push(new_tree); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 57 | add_to_last_open(token); [INFO] [stdout] | ---------------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `open_tags` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/tree.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 16 | let add_to_last_open = |token: &Token| -> &mut Tree { [INFO] [stdout] | ---------------------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 21 | if open_tags.len() == 0 { [INFO] [stdout] | --------- first borrow occurs due to use of `open_tags` in closure [INFO] [stdout] ... [INFO] [stdout] 48 | open_tags.remove(i); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 57 | add_to_last_open(token); [INFO] [stdout] | ---------------- immutable borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0382, E0502, E0515, E0596. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-parser` (bin "rust-parser") due to 6 previous errors [INFO] running `Command { std: "docker" "inspect" "ee1fe9a1cbee6e7e007bece8c0153765b51779e8209f622c95e4c187a91d7bdb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ee1fe9a1cbee6e7e007bece8c0153765b51779e8209f622c95e4c187a91d7bdb", kill_on_drop: false }` [INFO] [stdout] ee1fe9a1cbee6e7e007bece8c0153765b51779e8209f622c95e4c187a91d7bdb