quote_into/lib.rs
1#![doc=include_str!("../Readme.md")]
2
3pub use quote::ToTokens;
4
5/// Append the provided tokens to the [`TokenStream`](proc_macro2::TokenStream)
6///
7/// See module-level docs for more details.
8pub use quote_into_macro::quote_into;
9
10#[doc(hidden)]
11pub mod private {
12 pub use proc_macro2::{
13 Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree,
14 };
15
16 pub trait MutRef {
17 fn __quote_into_private_mut_ref(&mut self) -> &mut Self;
18 }
19
20 impl MutRef for TokenStream {
21 // 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
22 fn __quote_into_private_mut_ref(&mut self) -> &mut Self {
23 self
24 }
25 }
26}