diff --git a/codegen/src/function.rs b/codegen/src/function.rs index f3bfd344..0e4f1260 100644 --- a/codegen/src/function.rs +++ b/codegen/src/function.rs @@ -3,6 +3,11 @@ #[cfg(no_std)] use core::mem; +#[cfg(no_std)] +use alloc::format; +#[cfg(not(no_std))] +use std::format; + use std::collections::HashMap; use quote::{quote, quote_spanned}; diff --git a/src/plugin.rs b/src/plugin.rs index 70697015..b03df99c 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -3,6 +3,7 @@ pub use crate::{ stdlib::any::TypeId, stdlib::boxed::Box, + stdlib::format, stdlib::string::ToString, stdlib::vec::Vec, stdlib::vec as new_vec,