Skip to content

Commit 1cd2a73

Browse files
Hide a debug_assert var from rustc
1 parent c3cc892 commit 1cd2a73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/aobench/src/intersection/ray_plane.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl Intersect<Plane> for RayxN {
3838
let d = -plane.p.dot(plane.n);
3939
let v = ray.dir.dot(plane.n);
4040

41-
let old_isect = isect;
41+
let _old_isect = isect;
4242

4343
let m = v.abs().ge(f32xN::splat(1e-17));
4444
if m.any() {
@@ -58,10 +58,10 @@ impl Intersect<Plane> for RayxN {
5858
// Check that the vector and the scalar version produce the same results
5959
// for the same inputs in debug builds
6060
for i in 0..f32xN::lanes() {
61-
let old_isect_i = old_isect.get(i);
61+
let old_isect_i = _old_isect.get(i);
6262
let ray_i = self.get(i);
6363
let isect_i = ray_i.intersect(plane, old_isect_i);
64-
assert!(isect_i.almost_eq(&isect.get(i)), "{:?} !~= {:?}\n\nplane: {:?}\n\nold_isect: {:?}\n\nrays: {:?}\n\ni: {:?}\nold_isect_i: {:?}\nray_i: {:?}\n\n", isect_i, isect.get(i), plane, old_isect, self, i, old_isect_i, ray_i);
64+
assert!(isect_i.almost_eq(&isect.get(i)), "{:?} !~= {:?}\n\nplane: {:?}\n\nold_isect: {:?}\n\nrays: {:?}\n\ni: {:?}\nold_isect_i: {:?}\nray_i: {:?}\n\n", isect_i, isect.get(i), plane, _old_isect, self, i, old_isect_i, ray_i);
6565
}
6666
}
6767

0 commit comments

Comments
 (0)