Clarify how the quote macro is loaded

This commit is contained in:
Manish Goregaokar 2018-07-14 12:06:50 -07:00
parent 0db03e635a
commit 58f3f7b081
2 changed files with 5 additions and 0 deletions

View File

@ -236,6 +236,8 @@ pub mod token_stream {
///
/// Unquoting is done with `$`, and works by taking the single next ident as the unquoted term.
/// To quote `$` itself, use `$$`.
///
/// This is a dummy macro, the actual implementation is in quote::Quoter
#[unstable(feature = "proc_macro", issue = "38356")]
#[macro_export]
macro_rules! quote { () => {} }

View File

@ -21,6 +21,9 @@ use syntax::parse::token;
use syntax::symbol::Symbol;
use syntax::tokenstream;
/// This is the actual quote!() proc macro
///
/// It is manually loaded in CStore::load_macro_untracked
pub struct Quoter;
pub fn unquote<T: Into<TokenStream> + Clone>(tokens: &T) -> TokenStream {