Skip to content

Commit 72c4d07

Browse files
committed
spirv: hide deref vecs to fix dead code warnings
1 parent e6644da commit 72c4d07

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

src/deref.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
#[cfg(not(feature = "scalar-math"))]
2-
#[cfg_attr(target_arch = "spirv", repr(simd))]
3-
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
1+
#[cfg(not(any(feature = "scalar-math", target_arch = "spirv")))]
2+
#[repr(C)]
43
pub struct Vec3<T> {
54
pub x: T,
65
pub y: T,
76
pub z: T,
87
}
98

10-
#[cfg(not(feature = "scalar-math"))]
11-
#[cfg_attr(target_arch = "spirv", repr(simd))]
12-
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
9+
#[cfg(not(any(feature = "scalar-math", target_arch = "spirv")))]
10+
#[repr(C)]
1311
pub struct Vec4<T> {
1412
pub x: T,
1513
pub y: T,
1614
pub z: T,
1715
pub w: T,
1816
}
1917

20-
#[cfg(not(feature = "scalar-math"))]
21-
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
18+
#[cfg(not(any(feature = "scalar-math", target_arch = "spirv")))]
19+
#[repr(C)]
2220
pub struct Cols2<V> {
2321
pub x_axis: V,
2422
pub y_axis: V,
2523
}
2624

27-
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
25+
#[repr(C)]
2826
pub struct Cols3<V> {
2927
pub x_axis: V,
3028
pub y_axis: V,
3129
pub z_axis: V,
3230
}
3331

34-
#[cfg_attr(not(target_arch = "spirv"), repr(C))]
32+
#[repr(C)]
3533
pub struct Cols4<V> {
3634
pub x_axis: V,
3735
pub y_axis: V,

0 commit comments

Comments
 (0)