You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// A 4-dimensional vector.
///
/// This type is 16 byte aligned.
#[cfg(vec4_sse2)]
#[derive(Clone, Copy)]
#[repr(C)]
pub struct Vec4(pub(crate) __m128);
So my suspicion is that the vec4_sse2 option is not set, hiding the type.
The build.rs is what sets this option based on CARGO_CFG_TARGET_FEATURE.
What's the best way to deal with this as a user of glam-rs (or as the library author, to make rust-analyzer do the most sensible thing?)
Ah thanks, that does indeed take care of it. Though #6448 discusses the insecurity of the option (although when developing something with a build.rs, you'll end up running it whether you use rust-analyzer or not.. so not that big a difference)...
Wonder if glam-rs could somehow do this check without relying on a build.rs, but I'll take that issue over there.
This builds and runs, but rust-analyzer is unhappy with the vec4 type:
Here's the (rather trivial) repro:
https://github.com/hrydgard/ra-vec4-repro
glam::Vec4 is a SIMD type:
So my suspicion is that the
vec4_sse2
option is not set, hiding the type.The build.rs is what sets this option based on CARGO_CFG_TARGET_FEATURE.
What's the best way to deal with this as a user of glam-rs (or as the library author, to make rust-analyzer do the most sensible thing?)
I guess this is somewhat similar to #6038 ?
The text was updated successfully, but these errors were encountered: