Skip to content

Instantly share code, notes, and snippets.

@chrivers
Created March 7, 2016 20:54
Show Gist options
  • Save chrivers/e0ebf2e1b57b283f6992 to your computer and use it in GitHub Desktop.
Save chrivers/e0ebf2e1b57b283f6992 to your computer and use it in GitHub Desktop.
Compiling rustray v0.1.0 (file:///home/chrivers/git/rustray)
src/sphere.rs:21:21: 21:25 error: mismatched types:
expected `vector::Vector<F>`,
found `&_`
(expected struct `vector::Vector`,
found &-ptr) [E0308]
src/sphere.rs:21 fn trace(&self, &hit: Vector<F>, &light: Light<F>) -> Color<F>
^~~~
src/sphere.rs:21:21: 21:25 help: run `rustc --explain E0308` to see a detailed explanation
src/sphere.rs:21:38: 21:44 error: mismatched types:
expected `light::Light<F>`,
found `&_`
(expected struct `light::Light`,
found &-ptr) [E0308]
src/sphere.rs:21 fn trace(&self, &hit: Vector<F>, &light: Light<F>) -> Color<F>
^~~~~~
src/sphere.rs:21:38: 21:44 help: run `rustc --explain E0308` to see a detailed explanation
src/sphere.rs:23:17: 23:41 error: the type of this value must be known in this context
src/sphere.rs:23 let m = hit.vector_to(light.pos);
^~~~~~~~~~~~~~~~~~~~~~~~
src/sphere.rs:23:31: 23:40 error: the type of this value must be known in this context
src/sphere.rs:23 let m = hit.vector_to(light.pos);
^~~~~~~~~
src/sphere.rs:26:39: 26:58 error: the type of this value must be known in this context
src/sphere.rs:26 let reflection_coeff = F::max(normal.cos_angle(m), (normal * (-F::one())).cos_angle(m));
^~~~~~~~~~~~~~~~~~~
src/tracer.rs:57:40: 57:46 error: mismatched types:
expected `light::Light<F>`,
found `Box<light::Light<F>>`
(expected struct `light::Light`,
found box) [E0308]
src/tracer.rs:57 res = res + obj.trace(hit, *light);
^~~~~~
src/tracer.rs:57:40: 57:46 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 6 previous errors
Could not compile `rustray`.
To learn more, run the command again with --verbose.
make: *** [build] Error 101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment