ports/devel/pylyzer/files/patch-cargo-crates_rustpython-ast-0.3.0_src_impls.rs
Mikael Urankar 9d28fde03c devel/pylyzer: Fix build with rust-1.76.0
Import upstream patch [1] to fix the following error:

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> /wrkdirs/usr/ports/devel/pylyzer/work/pylyzer-0.0.51/cargo-crates/rustpython-ast-0.3.0/src/impls.rs:60:1

[1] 29c4728dbe

PR:		276920
Approved by:	portmgr (build fix blanket)
2024-02-19 12:59:02 +01:00

24 lines
1 KiB
Rust

https://github.com/RustPython/Parser/commit/29c4728dbedc7e69cc2560b9b34058bbba9b1303
--- cargo-crates/rustpython-ast-0.3.0/src/impls.rs.orig 2024-02-10 11:55:13
+++ cargo-crates/rustpython-ast-0.3.0/src/impls.rs
@@ -54,11 +54,12 @@ impl<R> Expr<R> {
}
}
-#[cfg(target_arch = "x86_64")]
-static_assertions::assert_eq_size!(crate::Expr, [u8; 72]);
-#[cfg(target_arch = "x86_64")]
-static_assertions::assert_eq_size!(crate::Stmt, [u8; 160]);
-#[cfg(target_arch = "x86_64")]
-static_assertions::assert_eq_size!(crate::Pattern, [u8; 96]);
-#[cfg(target_arch = "x86_64")]
+// TODO: make this a #[test] to avoid eq comparison
+// #[cfg(target_arch = "x86_64")]
+// static_assertions::assert_eq_size!(crate::Expr, [u8; 72]);
+// #[cfg(target_arch = "x86_64")]
+// static_assertions::assert_eq_size!(crate::Stmt, [u8; 160]);
+// #[cfg(target_arch = "x86_64")]
+// static_assertions::assert_eq_size!(crate::Pattern, [u8; 96]);
+// #[cfg(target_arch = "x86_64")]
static_assertions::assert_eq_size!(crate::ExceptHandler, [u8; 64]);