Skip to content

Commit

Permalink
Allow using hax-lib in #![no_std] environments
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlie Davis committed Jan 20, 2024
1 parent 40c6b0f commit a85567f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hax-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//! }
//! ```
#![no_std]

#[doc(hidden)]
#[cfg(hax)]
#[macro_export]
Expand Down Expand Up @@ -48,7 +50,7 @@ macro_rules! proxy_macro_if_not_hax {
/// disappears.
macro_rules! debug_assert {
($($arg:tt)*) => {
$crate::proxy_macro_if_not_hax!(::std::debug_assert, no, $($arg)*)
$crate::proxy_macro_if_not_hax!(::core::debug_assert, no, $($arg)*)
};
}

Expand All @@ -57,7 +59,7 @@ macro_rules! debug_assert {
/// into a `assert` in the backend.
macro_rules! assert {
($($arg:tt)*) => {
$crate::proxy_macro_if_not_hax!(::std::assert, $crate::assert, $($arg)*)
$crate::proxy_macro_if_not_hax!(::core::assert, $crate::assert, $($arg)*)
};
}

Expand Down

0 comments on commit a85567f

Please sign in to comment.