[INFO] cloning repository https://github.com/nikofil/ray-tracing [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/nikofil/ray-tracing" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnikofil%2Fray-tracing", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnikofil%2Fray-tracing'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9c4730e327188e5bfeefdd4998611635e6afcbd4 [INFO] checking nikofil/ray-tracing against master#a609fb45efad59dfd459c76e50899be9f0583b5a for pr-80579 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fnikofil%2Fray-tracing" "/workspace/builds/worker-2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/nikofil/ray-tracing on toolchain a609fb45efad59dfd459c76e50899be9f0583b5a [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+a609fb45efad59dfd459c76e50899be9f0583b5a" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/nikofil/ray-tracing [INFO] finished tweaking git repo https://github.com/nikofil/ray-tracing [INFO] tweaked toml for git repo https://github.com/nikofil/ray-tracing written to /workspace/builds/worker-2/source/Cargo.toml [INFO] crate git repo https://github.com/nikofil/ray-tracing already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+a609fb45efad59dfd459c76e50899be9f0583b5a" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/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" "rustops/crates-build-env@sha256:b8eeb62f26c39b23691079a6cb6de528d8e88b4d71a8f6b1d30f8ba7d9c16de9" "/opt/rustwide/cargo-home/bin/cargo" "+a609fb45efad59dfd459c76e50899be9f0583b5a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] fda5be6be3064ec8e64b4f12c579f926f381f1eaed64c1d5d2258c92f4afc0c4 [INFO] running `Command { std: "docker" "start" "-a" "fda5be6be3064ec8e64b4f12c579f926f381f1eaed64c1d5d2258c92f4afc0c4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fda5be6be3064ec8e64b4f12c579f926f381f1eaed64c1d5d2258c92f4afc0c4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fda5be6be3064ec8e64b4f12c579f926f381f1eaed64c1d5d2258c92f4afc0c4", kill_on_drop: false }` [INFO] [stdout] fda5be6be3064ec8e64b4f12c579f926f381f1eaed64c1d5d2258c92f4afc0c4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/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" "rustops/crates-build-env@sha256:b8eeb62f26c39b23691079a6cb6de528d8e88b4d71a8f6b1d30f8ba7d9c16de9" "/opt/rustwide/cargo-home/bin/cargo" "+a609fb45efad59dfd459c76e50899be9f0583b5a" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 53d9a20d93aa1171e3d2aeaecf8cadc11c008316efa54bfbbe28958becbc1d25 [INFO] running `Command { std: "docker" "start" "-a" "53d9a20d93aa1171e3d2aeaecf8cadc11c008316efa54bfbbe28958becbc1d25", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.21 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.40 [INFO] [stderr] Compiling libc v0.2.76 [INFO] [stderr] Compiling pin-project-internal v0.4.23 [INFO] [stderr] Compiling proc-macro-nested v0.1.6 [INFO] [stderr] Compiling getrandom v0.1.14 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Checking cfg-if v0.1.10 [INFO] [stderr] Checking once_cell v1.4.1 [INFO] [stderr] Checking futures-core v0.3.5 [INFO] [stderr] Checking futures-sink v0.3.5 [INFO] [stderr] Compiling proc-macro-hack v0.5.18 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Checking futures-io v0.3.5 [INFO] [stderr] Checking ppv-lite86 v0.2.9 [INFO] [stderr] Checking futures-channel v0.3.5 [INFO] [stderr] Checking futures-task v0.3.5 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Compiling futures-macro v0.3.5 [INFO] [stderr] Checking pin-project v0.4.23 [INFO] [stderr] Checking futures-util v0.3.5 [INFO] [stderr] Checking futures-executor v0.3.5 [INFO] [stderr] Checking futures v0.3.5 [INFO] [stderr] Checking ray-tracer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `ray` [INFO] [stdout] --> camera.rs:119:25 [INFO] [stdout] | [INFO] [stdout] 119 | let ray = Ray::new(start_pos, dir); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ray` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ray` [INFO] [stdout] --> camera.rs:126:29 [INFO] [stdout] | [INFO] [stdout] 126 | let ray = Ray::new(start_pos, dir); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ray` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `max_recursion` [INFO] [stdout] --> camera.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | let max_recursion = self.max_recursion; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_max_recursion` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scene` [INFO] [stdout] --> camera.rs:86:26 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn render(&self, scene: &Scene) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scene` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `colors` as mutable more than once at a time [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________-_____^ [INFO] [stdout] | |_______________________________| [INFO] [stdout] | || [INFO] [stdout] 114 | || let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | || [INFO] [stdout] 116 | || let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... || [INFO] [stdout] 130 | || colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | || ------ borrows occur due to use of `colors` in generator [INFO] [stdout] 131 | || }); [INFO] [stdout] | || ^ [INFO] [stdout] | ||_________________| [INFO] [stdout] | |__________________`colors` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | argument requires that `colors` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `i`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] | | - `i` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `i` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `i` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `y`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | - `y` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `y` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `y` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `j`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | | - `j` is borrowed here [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `j` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `j` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `colors`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | | ------ `colors` is borrowed here [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `colors` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `colors` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `antialiasing`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 121 | | for _ in 0..antialiasing { [INFO] [stdout] | | ------------ `antialiasing` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `antialiasing` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `antialiasing` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `pos`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] | | --- `pos` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `pos` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `pos` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `viewport_upper_left`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | ------------------- `viewport_upper_left` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `viewport_upper_left` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `viewport_upper_left` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `vertical`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | -------- `vertical` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `vertical` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `vertical` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `horizontal`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | ---------- `horizontal` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `horizontal` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `horizontal` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `image_width`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] | | ----------- `image_width` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `image_width` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `image_width` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `image_height`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 123 | | let dy = rng.gen_range(0.0, 1.0) / (image_height as f64 - 1.0); [INFO] [stdout] | | ------------ `image_height` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `image_height` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `image_height` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `colors` as immutable because it is also borrowed as mutable [INFO] [stdout] --> camera.rs:138:24 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________-_____- [INFO] [stdout] | |_______________________________| [INFO] [stdout] | || [INFO] [stdout] 114 | || let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | || [INFO] [stdout] 116 | || let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... || [INFO] [stdout] 130 | || colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | || ------ first borrow occurs due to use of `colors` in generator [INFO] [stdout] 131 | || }); [INFO] [stdout] | || - [INFO] [stdout] | ||_________________| [INFO] [stdout] | |__________________mutable borrow occurs here [INFO] [stdout] | argument requires that `colors` is borrowed for `'static` [INFO] [stdout] ... [INFO] [stdout] 138 | self.write_out(&colors, image_height); [INFO] [stdout] | ^^^^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `ray-tracer` [INFO] [stdout] error: aborting due to 13 previous errors; 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] Some errors have detailed explanations: E0373, E0499, E0502. [INFO] [stdout] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stdout] For more information about an error, try `rustc --explain E0373`. [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `ray` [INFO] [stdout] --> camera.rs:119:25 [INFO] [stdout] | [INFO] [stdout] 119 | let ray = Ray::new(start_pos, dir); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ray` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ray` [INFO] [stdout] --> camera.rs:126:29 [INFO] [stdout] | [INFO] [stdout] 126 | let ray = Ray::new(start_pos, dir); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_ray` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `max_recursion` [INFO] [stdout] --> camera.rs:106:13 [INFO] [stdout] | [INFO] [stdout] 106 | let max_recursion = self.max_recursion; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_max_recursion` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `scene` [INFO] [stdout] --> camera.rs:86:26 [INFO] [stdout] | [INFO] [stdout] 86 | pub fn render(&self, scene: &Scene) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_scene` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `colors` as mutable more than once at a time [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________-_____^ [INFO] [stdout] | |_______________________________| [INFO] [stdout] | || [INFO] [stdout] 114 | || let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | || [INFO] [stdout] 116 | || let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... || [INFO] [stdout] 130 | || colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | || ------ borrows occur due to use of `colors` in generator [INFO] [stdout] 131 | || }); [INFO] [stdout] | || ^ [INFO] [stdout] | ||_________________| [INFO] [stdout] | |__________________`colors` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | argument requires that `colors` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `i`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] | | - `i` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `i` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `i` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `y`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | - `y` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `y` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `y` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `j`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | | - `j` is borrowed here [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `j` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `j` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `colors`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | | ------ `colors` is borrowed here [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `colors` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `colors` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `antialiasing`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 121 | | for _ in 0..antialiasing { [INFO] [stdout] | | ------------ `antialiasing` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `antialiasing` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `antialiasing` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `pos`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] | | --- `pos` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `pos` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `pos` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `viewport_upper_left`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | ------------------- `viewport_upper_left` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `viewport_upper_left` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `viewport_upper_left` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `vertical`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | -------- `vertical` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `vertical` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `vertical` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `horizontal`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] | | ---------- `horizontal` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `horizontal` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `horizontal` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `image_width`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] | | ----------- `image_width` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `image_width` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `image_width` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: async block may outlive the current function, but it borrows `image_height`, which is owned by the current function [INFO] [stdout] --> camera.rs:113:37 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _____________________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 123 | | let dy = rng.gen_range(0.0, 1.0) / (image_height as f64 - 1.0); [INFO] [stdout] | | ------------ `image_height` is borrowed here [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ may outlive borrowed value `image_height` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> camera.rs:113:31 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________^ [INFO] [stdout] 114 | | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | | [INFO] [stdout] 116 | | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... | [INFO] [stdout] 130 | | colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] 131 | | }); [INFO] [stdout] | |_________________^ [INFO] [stdout] help: to force the async block to take ownership of `image_height` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async move { [INFO] [stdout] 114 | let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | [INFO] [stdout] 116 | let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] 117 | let start_pos = pos;// + self.aperture_offset(right_vec, up_vec); [INFO] [stdout] 118 | let dir = viewport_upper_left + x * horizontal - y * vertical - pos; [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `colors` as immutable because it is also borrowed as mutable [INFO] [stdout] --> camera.rs:138:24 [INFO] [stdout] | [INFO] [stdout] 113 | spawner.spawn(async { [INFO] [stdout] | _______________________________-_____- [INFO] [stdout] | |_______________________________| [INFO] [stdout] | || [INFO] [stdout] 114 | || let mut rng = rand::thread_rng(); [INFO] [stdout] 115 | || [INFO] [stdout] 116 | || let x = (i as f64) / (image_width as f64 - 1.0); [INFO] [stdout] ... || [INFO] [stdout] 130 | || colors[i][j] = colors[i][j].sqrt() [INFO] [stdout] | || ------ first borrow occurs due to use of `colors` in generator [INFO] [stdout] 131 | || }); [INFO] [stdout] | || - [INFO] [stdout] | ||_________________| [INFO] [stdout] | |__________________mutable borrow occurs here [INFO] [stdout] | argument requires that `colors` is borrowed for `'static` [INFO] [stdout] ... [INFO] [stdout] 138 | self.write_out(&colors, image_height); [INFO] [stdout] | ^^^^^^^ immutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 13 previous errors; 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0373, E0499, E0502. [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" "53d9a20d93aa1171e3d2aeaecf8cadc11c008316efa54bfbbe28958becbc1d25", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "53d9a20d93aa1171e3d2aeaecf8cadc11c008316efa54bfbbe28958becbc1d25", kill_on_drop: false }` [INFO] [stdout] 53d9a20d93aa1171e3d2aeaecf8cadc11c008316efa54bfbbe28958becbc1d25