Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Gate another assertion behind compiler-builtins #527

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/math/support/int_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down