Gate another assertion behind compiler-builtins

This is causing link errors on Windows.
This commit is contained in:
Trevor Gross 2025-02-24 06:52:48 +00:00 committed by Trevor Gross
parent 2615971f55
commit 1774882738

View file

@ -394,6 +394,7 @@ macro_rules! cast_into {
fn cast(self) -> $into {
// All we can really do to enforce casting rules is check the rules when in
// debug mode.
#[cfg(not(feature = "compiler-builtins"))]
debug_assert!(<$into>::try_from(self).is_ok(), "failed cast from {self}");
self as $into
}