Fixed compile error in compile_error

Also includes an insignificant naming change
This commit is contained in:
Sylvester Hesp 2023-02-13 12:22:21 +01:00 committed by Eduard-Mihai Burtescu
parent 0f9cd391ce
commit 25cb265b5e
2 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@ pub trait SampleType<const FORMAT: u32>: Scalar {
}
/// Helper macro to implement `SampleType` of various formats for various scalar types.
macro_rules! sampletype_impls {
macro_rules! sample_type_impls {
($($fmt:ident : $s:ty => ($v2:ty, $v3:ty, $v4:ty)),+ $(,)?) => {
$(
impl SampleType<{ ImageFormat::$fmt as u32 }> for $s {
@ -28,7 +28,7 @@ macro_rules! sampletype_impls {
}
#[cfg(feature = "glam")]
sampletype_impls! {
sample_type_impls! {
Unknown: i8 => (glam::IVec2, glam::IVec3, glam::IVec4),
Unknown: i16 => (glam::IVec2, glam::IVec3, glam::IVec4),
Unknown: i32 => (glam::IVec2, glam::IVec3, glam::IVec4),

View File

@ -121,7 +121,9 @@ pub use glam;
// so we keep the "glam" feature toggle intact for now. As the code won't currently compile
// without it, present the user with a somewhat friendly error message.
#[cfg(not(feature = "glam"))]
compile_error!("`spriv-std` now requires the use of `glam`. Make sure the "glam" feature is specified for `spirv-std` in `Cargo.toml`");
compile_error!(
r#"`spriv-std` now requires the use of `glam`. Make sure the "glam" feature is specified for `spirv-std` in `Cargo.toml`"#
);
#[cfg(all(not(test), target_arch = "spirv"))]
#[panic_handler]