diff options
-rw-r--r-- | src/ident_fragment.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/runtime.rs | 4 | ||||
-rw-r--r-- | src/to_tokens.rs | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/ident_fragment.rs b/src/ident_fragment.rs index 4ce82a5..6c2a9a8 100644 --- a/src/ident_fragment.rs +++ b/src/ident_fragment.rs @@ -1,6 +1,6 @@ +use alloc::borrow::Cow; use core::fmt; use proc_macro2::{Ident, Span}; -use std::borrow::Cow; /// Specialized formatting trait used by `format_ident!`. /// @@ -102,6 +102,8 @@ clippy::wrong_self_convention, )] +extern crate alloc; + #[cfg(feature = "proc-macro")] extern crate proc_macro; diff --git a/src/runtime.rs b/src/runtime.rs index fff9951..ce893eb 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -5,9 +5,9 @@ use core::iter; use core::ops::BitOr; use proc_macro2::{Group, Ident, Punct, Spacing, TokenTree}; +pub use alloc::format; pub use core::option::Option; pub use proc_macro2::{Delimiter, Span, TokenStream}; -pub use std::format; pub struct HasIterator; // True pub struct ThereIsNoIteratorInRepetition; // False @@ -50,8 +50,8 @@ pub mod ext { use super::RepInterp; use super::{HasIterator as HasIter, ThereIsNoIteratorInRepetition as DoesNotHaveIter}; use crate::ToTokens; + use alloc::collections::btree_set::{self, BTreeSet}; use core::slice; - use std::collections::btree_set::{self, BTreeSet}; /// Extension trait providing the `quote_into_iter` method on iterators. pub trait RepIteratorExt: Iterator + Sized { diff --git a/src/to_tokens.rs b/src/to_tokens.rs index 5748721..23b6ec2 100644 --- a/src/to_tokens.rs +++ b/src/to_tokens.rs @@ -1,8 +1,8 @@ use super::TokenStreamExt; +use alloc::borrow::Cow; +use alloc::rc::Rc; use core::iter; use proc_macro2::{Group, Ident, Literal, Punct, Span, TokenStream, TokenTree}; -use std::borrow::Cow; -use std::rc::Rc; /// Types that can be interpolated inside a `quote!` invocation. /// |