about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-12-07 13:29:04 -0800
committerGraydon Hoare <graydon@mozilla.com>2011-12-07 13:33:00 -0800
commite056ffa17d8dad336a3f8380d3d23f282f7f067d (patch)
treef2f226ffc1ada86f906ae96363d9cdfc0de7cc78 /src/comp/syntax
parent799690bea0dbcf427bf7a9a813fec163eedf217d (diff)
downloadrust-e056ffa17d8dad336a3f8380d3d23f282f7f067d.tar.gz
rust-e056ffa17d8dad336a3f8380d3d23f282f7f067d.zip
Inject the view_items for core in the right place, add comment documenting why the wrong place was wrong.
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/ast.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs
index a501d083aae..be3bf5b5ee0 100644
--- a/src/comp/syntax/ast.rs
+++ b/src/comp/syntax/ast.rs
@@ -60,7 +60,14 @@ type crate_ =
 tag crate_directive_ {
     cdir_src_mod(ident, [attribute]);
     cdir_dir_mod(ident, [@crate_directive], [attribute]);
+
+    // NB: cdir_view_item is *not* processed by the rest of the compiler; the
+    // attached view_items are sunk into the crate's module during parsing,
+    // and processed (resolved, imported, etc.) there. This tag-variant exists
+    // only to preserve the view items in order in case we decide to
+    // pretty-print crates in the future.
     cdir_view_item(@view_item);
+
     cdir_syntax(@path);
 }