about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-16 04:40:21 +0000
committerbors <bors@rust-lang.org>2018-07-16 04:40:21 +0000
commit88b025bccb2e8ee9bdecdec737dec150e03177aa (patch)
treeb16962f92a73279ea23d5f8bc5cb3e1f37b8d9dc
parent99140df0bd5a4dd77db28d78e73df4b5f6ba79a6 (diff)
parent58f3f7b0810ff2349cec21395ee066dc2df004a7 (diff)
downloadrust-88b025bccb2e8ee9bdecdec737dec150e03177aa.tar.gz
rust-88b025bccb2e8ee9bdecdec737dec150e03177aa.zip
Auto merge of #52386 - Manishearth:quote-clarify, r=petrochenkov
Clarify how the quote macro is loaded

@QuietMisdreavus needed to figure this out for writing a testcase, this should be better documented.

r? @jseyfried
-rw-r--r--src/libproc_macro/lib.rs2
-rw-r--r--src/libproc_macro/quote.rs3
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 {