about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-13 11:26:43 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-04-13 11:29:28 -0700
commite163ab215105753fd4e9b60a3786ff4636a0c3ff (patch)
tree063d89f9ea9215f515dfad2513b2a327ada55584 /src/libsyntax
parent7240fad25e309ae5d8ebfb2b7544a1e62f9382fe (diff)
downloadrust-e163ab215105753fd4e9b60a3786ff4636a0c3ff.tar.gz
rust-e163ab215105753fd4e9b60a3786ff4636a0c3ff.zip
rustc: Don't link in syntax extensions
This bug was introduced in #13384 by accident, and this commit continues the
work of #13384 by finishing support for loading a syntax extension crate without
registering it with the local cstore.

Closes #13495
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/registrar.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsyntax/ext/registrar.rs b/src/libsyntax/ext/registrar.rs
index ecd60fc9932..b76708147e1 100644
--- a/src/libsyntax/ext/registrar.rs
+++ b/src/libsyntax/ext/registrar.rs
@@ -36,7 +36,7 @@ impl Visitor<()> for MacroRegistrarContext {
 }
 
 pub fn find_macro_registrar(diagnostic: &diagnostic::SpanHandler,
-                            krate: &ast::Crate) -> Option<ast::DefId> {
+                            krate: &ast::Crate) -> Option<ast::NodeId> {
     let mut ctx = MacroRegistrarContext { registrars: Vec::new() };
     visit::walk_crate(&mut ctx, krate, ());
 
@@ -44,10 +44,7 @@ pub fn find_macro_registrar(diagnostic: &diagnostic::SpanHandler,
         0 => None,
         1 => {
             let (node_id, _) = ctx.registrars.pop().unwrap();
-            Some(ast::DefId {
-                krate: ast::LOCAL_CRATE,
-                node: node_id
-            })
+            Some(node_id)
         },
         _ => {
             diagnostic.handler().err("multiple macro registration functions found");