about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2020-02-15 15:51:40 -0500
committerAaron Hill <aa1ronham@gmail.com>2020-02-15 15:51:40 -0500
commit516459870cf0fe13979aaa568bfc413e2e5bba18 (patch)
tree424fe4860a01cb7f4c5f811e9a244de82ab99284 /src/libsyntax
parent51a16e574aa1b20dbaa94436065ce80f3ba725d1 (diff)
downloadrust-516459870cf0fe13979aaa568bfc413e2e5bba18.tar.gz
rust-516459870cf0fe13979aaa568bfc413e2e5bba18.zip
Add additional comment
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 1973733288b..d101473d76b 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -429,6 +429,12 @@ pub struct Crate {
     pub module: Mod,
     pub attrs: Vec<Attribute>,
     pub span: Span,
+    /// The order of items in the HIR is unrelated to the order of
+    /// items in the AST. However, we generate proc macro harnesses
+    /// based on the AST order, and later refer to these harnesses
+    /// from the HIR. This field keeps track of the order in which
+    /// we generated proc macros harnesses, so that we can map
+    /// HIR proc macros items back to their harness items.
     pub proc_macros: Vec<NodeId>,
 }