Skip to content

Commit 928c84b

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

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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

examples/aobench/src/intersection/ray_sphere.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Intersect<Sphere> for RayxN {
4343
let c = radius.mul_adde(-radius, rs.dot(rs));
4444
let d = b.mul_adde(b, -c);
4545

46-
let old_isect = isect;
46+
let _old_isect = isect;
4747

4848
let m = d.gt(f32xN::splat(0.));
4949
if m.any() {
@@ -64,10 +64,10 @@ impl Intersect<Sphere> for RayxN {
6464
// Check that the vector and the scalar version produce the same results
6565
// for the same inputs in debug builds
6666
for i in 0..f32xN::lanes() {
67-
let old_isect_i = old_isect.get(i);
67+
let old_isect_i = _old_isect.get(i);
6868
let ray_i = self.get(i);
6969
let isect_i = ray_i.intersect(sphere, old_isect_i);
70-
assert!(isect_i.almost_eq(&isect.get(i)), "{:?} !~= {:?}\n\nsphere: {:?}\n\nold_isect: {:?}\n\nrays: {:?}\n\ni: {:?}\nold_isect_i: {:?}\nray_i: {:?}\n\n", isect_i, isect.get(i), sphere, old_isect, self, i, old_isect_i, ray_i);
70+
assert!(isect_i.almost_eq(&isect.get(i)), "{:?} !~= {:?}\n\nsphere: {:?}\n\nold_isect: {:?}\n\nrays: {:?}\n\ni: {:?}\nold_isect_i: {:?}\nray_i: {:?}\n\n", isect_i, isect.get(i), sphere, _old_isect, self, i, old_isect_i, ray_i);
7171
}
7272
}
7373

0 commit comments

Comments
 (0)