Updates for making soa no_std

This commit is contained in:
Richard Feldman 2024-10-12 21:27:41 -04:00
parent 178bc469e6
commit 44d00e1f13
No known key found for this signature in database
GPG key ID: DAC334802F365236
21 changed files with 164 additions and 151 deletions

View file

@ -540,6 +540,7 @@ pub fn try_run_lib_function<T>(
}
}
#[allow(dead_code)]
// only used in tests
pub(crate) fn llvm_evals_to<T, U, F>(
src: &str,
@ -589,6 +590,7 @@ pub(crate) fn llvm_evals_to<T, U, F>(
}
}
#[allow(unused_macros)]
macro_rules! assert_llvm_evals_to {
($src:expr, $expected:expr, $ty:ty, $transform:expr, $ignore_problems:expr) => {
crate::helpers::llvm::llvm_evals_to::<$ty, _, _>(
@ -653,6 +655,7 @@ macro_rules! assert_evals_to {
}};
}
#[allow(unused_macros)]
macro_rules! assert_evals_to_erased {
($src:expr, $expected:expr, $ty:ty) => {{
crate::helpers::llvm::llvm_evals_to::<$ty, _, _>(
@ -665,12 +668,16 @@ macro_rules! assert_evals_to_erased {
}};
}
#[allow(dead_code)]
pub fn identity<T>(value: T) -> T {
value
}
#[allow(unused_imports)]
pub(crate) use assert_evals_to;
#[allow(unused_imports)]
pub(crate) use assert_evals_to_erased;
#[allow(unused_imports)]
pub(crate) use assert_llvm_evals_to;
#[cfg(feature = "gen-llvm-wasm")]
pub(crate) use assert_wasm_evals_to;