1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#![doc=include_str!("../Readme.md")]
pub use quote::ToTokens;
/// Append the provided tokens to the [`TokenStream`](proc_macro2::TokenStream)
///
/// See module-level docs for more details.
pub use quote_into_macro::quote_into;
#[doc(hidden)]
pub mod private {
pub use proc_macro2::{
Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree,
};
pub trait MutRef {
fn __quote_into_private_mut_ref(&mut self) -> &mut Self;
}
impl MutRef for TokenStream {
// Normally, we would use fully qualified syntax. However, the whole point of this trait is to let us use the dot operator so we can use its auto-referencing capabilities. Hence, we choose an ugly name that won't collide
fn __quote_into_private_mut_ref(&mut self) -> &mut Self {
self
}
}
}