From 7fcbfcc7fdc2cd243f6487663506c220fa3870dc Mon Sep 17 00:00:00 2001 From: J Henry Waugh Date: Fri, 14 Aug 2020 19:26:01 -0500 Subject: [PATCH] codegen: explicit import of format! macro --- codegen/src/function.rs | 5 +++++ src/plugin.rs | 1 + 2 files changed, 6 insertions(+) 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,