From 7dd6efcc0784dd86b81550d42a21a2653e52a161 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Mon, 12 Dec 2022 21:42:47 +0000 Subject: [PATCH] fix: pointer width guard for size assertion --- --- a/crates/jrsonnet-evaluator/src/val.rs +++ b/crates/jrsonnet-evaluator/src/val.rs @@ -301,6 +301,7 @@ Func(FuncVal), } +#[cfg(target_pointer_width = "64")] static_assertions::assert_eq_size!(Val, [u8; 24]); impl From for Val { --- a/crates/jrsonnet-parser/src/source.rs +++ b/crates/jrsonnet-parser/src/source.rs @@ -33,8 +33,8 @@ } fn dyn_eq(&self, other: &dyn $T) -> bool { let Some(other) = other.as_any().downcast_ref::() else { - return false - }; + return false + }; let this = ::as_any(self) .downcast_ref::() .expect("restricted by impl"); @@ -260,7 +260,6 @@ #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[derive(Clone, PartialEq, Eq, Debug)] pub struct Source(pub Rc<(SourcePath, IStr)>); -static_assertions::assert_eq_size!(Source, *const ()); impl Trace for Source { fn trace(&self, _tracer: &mut Tracer) {} -- gitstuff