codegen: explicit import of format! macro

This commit is contained in:
J Henry Waugh 2020-08-14 19:26:01 -05:00
parent 1051a3f108
commit 7fcbfcc7fd
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,11 @@
#[cfg(no_std)] #[cfg(no_std)]
use core::mem; use core::mem;
#[cfg(no_std)]
use alloc::format;
#[cfg(not(no_std))]
use std::format;
use std::collections::HashMap; use std::collections::HashMap;
use quote::{quote, quote_spanned}; use quote::{quote, quote_spanned};

View File

@ -3,6 +3,7 @@
pub use crate::{ pub use crate::{
stdlib::any::TypeId, stdlib::any::TypeId,
stdlib::boxed::Box, stdlib::boxed::Box,
stdlib::format,
stdlib::string::ToString, stdlib::string::ToString,
stdlib::vec::Vec, stdlib::vec::Vec,
stdlib::vec as new_vec, stdlib::vec as new_vec,