diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2018-07-14 12:06:50 -0700 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-07-14 12:06:50 -0700 |
| commit | 58f3f7b0810ff2349cec21395ee066dc2df004a7 (patch) | |
| tree | 4f2478842fa9bd61301cc92cc3deb1350110903a | |
| parent | 0db03e635a5e38ebc7635637b870b8fbcc8a7e46 (diff) | |
| download | rust-58f3f7b0810ff2349cec21395ee066dc2df004a7.tar.gz rust-58f3f7b0810ff2349cec21395ee066dc2df004a7.zip | |
Clarify how the quote macro is loaded
| -rw-r--r-- | src/libproc_macro/lib.rs | 2 | ||||
| -rw-r--r-- | src/libproc_macro/quote.rs | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 7c0cf9eadde..ecc66e869ae 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -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 { () => {} } diff --git a/src/libproc_macro/quote.rs b/src/libproc_macro/quote.rs index 4cd822aa9d0..73a66640c59 100644 --- a/src/libproc_macro/quote.rs +++ b/src/libproc_macro/quote.rs @@ -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 { |
