[INFO] cloning repository https://github.com/ZapAnton/toy_tracer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ZapAnton/toy_tracer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZapAnton%2Ftoy_tracer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZapAnton%2Ftoy_tracer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 81535ad9552f9acfba2d1bad1a730b765bf89de6 [INFO] checking ZapAnton/toy_tracer/81535ad9552f9acfba2d1bad1a730b765bf89de6 against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FZapAnton%2Ftoy_tracer" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/ZapAnton/toy_tracer on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/ZapAnton/toy_tracer [INFO] finished tweaking git repo https://github.com/ZapAnton/toy_tracer [INFO] tweaked toml for git repo https://github.com/ZapAnton/toy_tracer written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/ZapAnton/toy_tracer 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" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded libc v0.2.49 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 46091e2cc52b58359611c05b83a906709ae3ae69a2f003d03f33bee72f9c3afe [INFO] running `Command { std: "docker" "start" "-a" "46091e2cc52b58359611c05b83a906709ae3ae69a2f003d03f33bee72f9c3afe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "46091e2cc52b58359611c05b83a906709ae3ae69a2f003d03f33bee72f9c3afe", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "46091e2cc52b58359611c05b83a906709ae3ae69a2f003d03f33bee72f9c3afe", kill_on_drop: false }` [INFO] [stdout] 46091e2cc52b58359611c05b83a906709ae3ae69a2f003d03f33bee72f9c3afe [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a221492509e73b6785eab300d83f5b8cfc9773325037719ed05828829843cc68 [INFO] running `Command { std: "docker" "start" "-a" "a221492509e73b6785eab300d83f5b8cfc9773325037719ed05828829843cc68", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v0.1.2 [INFO] [stderr] Checking rand_core v0.4.0 [INFO] [stderr] Compiling libc v0.2.49 [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking rand_jitter v0.1.3 [INFO] [stderr] Checking rand_xorshift v0.1.1 [INFO] [stderr] Checking rand_isaac v0.1.1 [INFO] [stderr] Checking rand_hc v0.1.0 [INFO] [stderr] Compiling rand_pcg v0.1.2 [INFO] [stderr] Compiling rand_chacha v0.1.1 [INFO] [stderr] Compiling rand v0.6.5 [INFO] [stderr] Checking rand_os v0.1.2 [INFO] [stderr] Checking toy_tracer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/material.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter(&self, ray_in: &Ray, hit_record: &HitRecord) -> Option { [INFO] [stdout] | - - let's call the lifetime of this reference `'1` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] ... [INFO] [stdout] 25 | / Some(ScatteredRay { [INFO] [stdout] 26 | | ray: Ray::new(&hit_record.p, &(target - hit_record.p.borrow())), [INFO] [stdout] 27 | | attenuation: albedo, [INFO] [stdout] 28 | | }) [INFO] [stdout] | |__________________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter<'a>(&self, ray_in: &Ray, hit_record: &'a HitRecord<'a>) -> Option> { [INFO] [stdout] | ++++ ++ ++++ ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/material.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter(&self, ray_in: &Ray, hit_record: &HitRecord) -> Option { [INFO] [stdout] | - - let's call the lifetime of this reference `'1` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] ... [INFO] [stdout] 25 | / Some(ScatteredRay { [INFO] [stdout] 26 | | ray: Ray::new(&hit_record.p, &(target - hit_record.p.borrow())), [INFO] [stdout] 27 | | attenuation: albedo, [INFO] [stdout] 28 | | }) [INFO] [stdout] | |__________________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter<'a>(&self, ray_in: &Ray, hit_record: &'a HitRecord<'a>) -> Option> { [INFO] [stdout] | ++++ ++ ++++ ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/material.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter(&self, ray_in: &Ray, hit_record: &HitRecord) -> Option { [INFO] [stdout] | - ---------- has type `&HitRecord<'3>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] ... [INFO] [stdout] 25 | / Some(ScatteredRay { [INFO] [stdout] 26 | | ray: Ray::new(&hit_record.p, &(target - hit_record.p.borrow())), [INFO] [stdout] 27 | | attenuation: albedo, [INFO] [stdout] 28 | | }) [INFO] [stdout] | |__________________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'3` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter<'a>(&self, ray_in: &Ray, hit_record: &HitRecord<'a>) -> Option> { [INFO] [stdout] | ++++ ++++ ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> src/material.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter(&self, ray_in: &Ray, hit_record: &HitRecord) -> Option { [INFO] [stdout] | - ---------- has type `&HitRecord<'3>` [INFO] [stdout] | | [INFO] [stdout] | let's call the lifetime of this reference `'2` [INFO] [stdout] ... [INFO] [stdout] 25 | / Some(ScatteredRay { [INFO] [stdout] 26 | | ray: Ray::new(&hit_record.p, &(target - hit_record.p.borrow())), [INFO] [stdout] 27 | | attenuation: albedo, [INFO] [stdout] 28 | | }) [INFO] [stdout] | |__________________^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'3` [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter and update trait if needed [INFO] [stdout] | [INFO] [stdout] 19 | fn scatter<'a>(&self, ray_in: &Ray, hit_record: &HitRecord<'a>) -> Option> { [INFO] [stdout] | ++++ ++++ ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/material.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 25 | / Some(ScatteredRay { [INFO] [stdout] 26 | | ray: Ray::new(&hit_record.p, &(target - hit_record.p.borrow())), [INFO] [stdout] | | -------------------------------- temporary value created here [INFO] [stdout] 27 | | attenuation: albedo, [INFO] [stdout] 28 | | }) [INFO] [stdout] | |__________________^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing temporary value [INFO] [stdout] --> src/material.rs:25:17 [INFO] [stdout] | [INFO] [stdout] 25 | / Some(ScatteredRay { [INFO] [stdout] 26 | | ray: Ray::new(&hit_record.p, &(target - hit_record.p.borrow())), [INFO] [stdout] | | -------------------------------- temporary value created here [INFO] [stdout] 27 | | attenuation: albedo, [INFO] [stdout] 28 | | }) [INFO] [stdout] | |__________________^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `reflected` [INFO] [stdout] --> src/material.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 32 | let ray = Ray::new(&hit_record.p, &reflected); [INFO] [stdout] | ---------- `reflected` is borrowed here [INFO] [stdout] 33 | if crate::dot(ray.direction, &hit_record.normal) > 0.0 { [INFO] [stdout] 34 | / Some(ScatteredRay { [INFO] [stdout] 35 | | ray: ray, [INFO] [stdout] 36 | | attenuation: albedo, [INFO] [stdout] 37 | | }) [INFO] [stdout] | |______________________^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `reflected` [INFO] [stdout] --> src/material.rs:34:21 [INFO] [stdout] | [INFO] [stdout] 32 | let ray = Ray::new(&hit_record.p, &reflected); [INFO] [stdout] | ---------- `reflected` is borrowed here [INFO] [stdout] 33 | if crate::dot(ray.direction, &hit_record.normal) > 0.0 { [INFO] [stdout] 34 | / Some(ScatteredRay { [INFO] [stdout] 35 | | ray: ray, [INFO] [stdout] 36 | | attenuation: albedo, [INFO] [stdout] 37 | | }) [INFO] [stdout] | |______________________^ returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.material` which is behind a shared reference [INFO] [stdout] --> src/sphere.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | self.material, [INFO] [stdout] | ^^^^^^^^^^^^^ move occurs because `self.material` has type `Material`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `Material` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/material.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | pub enum Material { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/sphere.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | self.material, [INFO] [stdout] | ------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.material` which is behind a shared reference [INFO] [stdout] --> src/sphere.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | self.material, [INFO] [stdout] | ^^^^^^^^^^^^^ move occurs because `self.material` has type `Material`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `Material` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/material.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | pub enum Material { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/sphere.rs:41:21 [INFO] [stdout] | [INFO] [stdout] 41 | self.material, [INFO] [stdout] | ------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.material` which is behind a shared reference [INFO] [stdout] --> src/sphere.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | self.material, [INFO] [stdout] | ^^^^^^^^^^^^^ move occurs because `self.material` has type `Material`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `Material` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/material.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | pub enum Material { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/sphere.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | self.material, [INFO] [stdout] | ------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.material` which is behind a shared reference [INFO] [stdout] --> src/sphere.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | self.material, [INFO] [stdout] | ^^^^^^^^^^^^^ move occurs because `self.material` has type `Material`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: if `Material` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/material.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | pub enum Material { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] | [INFO] [stdout] ::: src/sphere.rs:57:21 [INFO] [stdout] | [INFO] [stdout] 57 | self.material, [INFO] [stdout] | ------------- you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0507, E0515. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0507`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0507, E0515. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0507`. [INFO] [stdout] [INFO] [stderr] error: could not compile `toy_tracer` (lib) due to 7 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `toy_tracer` (lib test) due to 7 previous errors [INFO] running `Command { std: "docker" "inspect" "a221492509e73b6785eab300d83f5b8cfc9773325037719ed05828829843cc68", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a221492509e73b6785eab300d83f5b8cfc9773325037719ed05828829843cc68", kill_on_drop: false }` [INFO] [stdout] a221492509e73b6785eab300d83f5b8cfc9773325037719ed05828829843cc68