[INFO] cloning repository https://github.com/miguelraz/kessels [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/miguelraz/kessels" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmiguelraz%2Fkessels", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmiguelraz%2Fkessels'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] cede6a5e56dbbc8aaae48e35f8426a1aebcf7340 [INFO] checking miguelraz/kessels against try#45d8b6e68beee1c9c1ce92ae258a7e02f8f13aa4 for pr-83744 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmiguelraz%2Fkessels" "/workspace/builds/worker-14/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-14/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/miguelraz/kessels on toolchain 45d8b6e68beee1c9c1ce92ae258a7e02f8f13aa4 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+45d8b6e68beee1c9c1ce92ae258a7e02f8f13aa4" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/miguelraz/kessels [INFO] finished tweaking git repo https://github.com/miguelraz/kessels [INFO] tweaked toml for git repo https://github.com/miguelraz/kessels written to /workspace/builds/worker-14/source/Cargo.toml [INFO] crate git repo https://github.com/miguelraz/kessels already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+45d8b6e68beee1c9c1ce92ae258a7e02f8f13aa4" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/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:20528e8c29e4536546f0102ce88568b16ea7538393a33fcca951030f7af10457" "/opt/rustwide/cargo-home/bin/cargo" "+45d8b6e68beee1c9c1ce92ae258a7e02f8f13aa4" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 007a87133d48574448efe473b5d2c0f282c062e96a547f5e072ae5fb6671042b [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "007a87133d48574448efe473b5d2c0f282c062e96a547f5e072ae5fb6671042b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "007a87133d48574448efe473b5d2c0f282c062e96a547f5e072ae5fb6671042b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "007a87133d48574448efe473b5d2c0f282c062e96a547f5e072ae5fb6671042b", kill_on_drop: false }` [INFO] [stdout] 007a87133d48574448efe473b5d2c0f282c062e96a547f5e072ae5fb6671042b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-14/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" "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:20528e8c29e4536546f0102ce88568b16ea7538393a33fcca951030f7af10457" "/opt/rustwide/cargo-home/bin/cargo" "+45d8b6e68beee1c9c1ce92ae258a7e02f8f13aa4" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] dbe05c6795bbb6e3c7c9fe003f3be3cbaafdd41c85cd0d100f76f74970d514bb [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "dbe05c6795bbb6e3c7c9fe003f3be3cbaafdd41c85cd0d100f76f74970d514bb", kill_on_drop: false }` [INFO] [stderr] Checking kessels v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0463]: can't find crate for `kessels` [INFO] [stdout] --> tests/integration_test.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | extern crate kessels; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ can't find crate [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0463`. [INFO] [stdout] [INFO] [stderr] error: could not compile `kessels` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0499]: cannot borrow `competing` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `competing` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 47 | | competing[node][id] = 1; [INFO] [stdout] | | --------- borrows occur due to use of `competing` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `competing` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `turn` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `turn` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 50 | | let local = (turn[node][1 - id] + id) % 2; [INFO] [stdout] | | ---- borrows occur due to use of `turn` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `turn` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `edge` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `edge` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 60 | | edge[node] = id; [INFO] [stdout] | | ---- borrows occur due to use of `edge` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `edge` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `totalsum` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `totalsum` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 64 | | totalsum += work(4); [INFO] [stdout] | | -------- borrows occur due to use of `totalsum` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `totalsum` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `i`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `i` [INFO] [stdout] ... [INFO] [stdout] 35 | let idThread = i; [INFO] [stdout] | - `i` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `i` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `turn`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `turn` [INFO] [stdout] ... [INFO] [stdout] 50 | let local = (turn[node][1 - id] + id) % 2; [INFO] [stdout] | ---- `turn` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `turn` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `competing`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `competing` [INFO] [stdout] ... [INFO] [stdout] 47 | competing[node][id] = 1; [INFO] [stdout] | --------- `competing` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `competing` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `edge`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `edge` [INFO] [stdout] ... [INFO] [stdout] 60 | edge[node] = id; [INFO] [stdout] | ---- `edge` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `edge` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `n`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `n` [INFO] [stdout] ... [INFO] [stdout] 36 | let mut node = idThread + n; [INFO] [stdout] | - `n` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `n` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `totalsum`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `totalsum` [INFO] [stdout] ... [INFO] [stdout] 64 | totalsum += work(4); [INFO] [stdout] | -------- `totalsum` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `totalsum` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `totalsum` because it was mutably borrowed [INFO] [stdout] --> src/main.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - -- borrow of `totalsum` occurs here [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 64 | | totalsum += work(4); [INFO] [stdout] | | -------- borrow occurs due to use of `totalsum` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `totalsum` is borrowed for `'static` [INFO] [stdout] ... [INFO] [stdout] 80 | totalsum [INFO] [stdout] | ^^^^^^^^ use of borrowed `totalsum` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 11 previous errors; 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0373, E0499, E0503. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0373`. [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `competing` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `competing` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 47 | | competing[node][id] = 1; [INFO] [stdout] | | --------- borrows occur due to use of `competing` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `competing` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `turn` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `turn` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 50 | | let local = (turn[node][1 - id] + id) % 2; [INFO] [stdout] | | ---- borrows occur due to use of `turn` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `turn` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `edge` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `edge` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 60 | | edge[node] = id; [INFO] [stdout] | | ---- borrows occur due to use of `edge` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `edge` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `totalsum` as mutable more than once at a time [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - ^^ `totalsum` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 64 | | totalsum += work(4); [INFO] [stdout] | | -------- borrows occur due to use of `totalsum` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `totalsum` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `i`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `i` [INFO] [stdout] ... [INFO] [stdout] 35 | let idThread = i; [INFO] [stdout] | - `i` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `i` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `turn`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `turn` [INFO] [stdout] ... [INFO] [stdout] 50 | let local = (turn[node][1 - id] + id) % 2; [INFO] [stdout] | ---- `turn` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `turn` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `competing`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `competing` [INFO] [stdout] ... [INFO] [stdout] 47 | competing[node][id] = 1; [INFO] [stdout] | --------- `competing` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `competing` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `edge`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `edge` [INFO] [stdout] ... [INFO] [stdout] 60 | edge[node] = id; [INFO] [stdout] | ---- `edge` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `edge` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `n`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `n` [INFO] [stdout] ... [INFO] [stdout] 36 | let mut node = idThread + n; [INFO] [stdout] | - `n` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `n` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `totalsum`, which is owned by the current function [INFO] [stdout] --> src/main.rs:32:36 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ^^ may outlive borrowed value `totalsum` [INFO] [stdout] ... [INFO] [stdout] 64 | totalsum += work(4); [INFO] [stdout] | -------- `totalsum` is borrowed here [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> src/main.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | ______________________^ [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________^ [INFO] [stdout] help: to force the closure to take ownership of `totalsum` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0503]: cannot use `totalsum` because it was mutably borrowed [INFO] [stdout] --> src/main.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 32 | threads.push(thread::spawn(|| { [INFO] [stdout] | - -- borrow of `totalsum` occurs here [INFO] [stdout] | ______________________| [INFO] [stdout] | | [INFO] [stdout] 33 | | // Begin downpass through the tournament tree [INFO] [stdout] 34 | | // Initialize variables local to each threads [INFO] [stdout] 35 | | let idThread = i; [INFO] [stdout] ... | [INFO] [stdout] 64 | | totalsum += work(4); [INFO] [stdout] | | -------- borrow occurs due to use of `totalsum` in closure [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | })); [INFO] [stdout] | |__________- argument requires that `totalsum` is borrowed for `'static` [INFO] [stdout] ... [INFO] [stdout] 80 | totalsum [INFO] [stdout] | ^^^^^^^^ use of borrowed `totalsum` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 11 previous errors; 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0373, E0499, E0503. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0373`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "dbe05c6795bbb6e3c7c9fe003f3be3cbaafdd41c85cd0d100f76f74970d514bb", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dbe05c6795bbb6e3c7c9fe003f3be3cbaafdd41c85cd0d100f76f74970d514bb", kill_on_drop: false }` [INFO] [stdout] dbe05c6795bbb6e3c7c9fe003f3be3cbaafdd41c85cd0d100f76f74970d514bb