about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-14 14:36:54 -0700
committerbors <bors@rust-lang.org>2014-04-14 14:36:54 -0700
commit168b2d1a3f4569706fe4f9a2baee04e37f85d297 (patch)
tree254770da00e77a681fdbf3d2c05c732e4449d45f /src/libsyntax
parent246ebd2d5aebc68a581c33c33cbce5f2bc7dc7d6 (diff)
parente163ab215105753fd4e9b60a3786ff4636a0c3ff (diff)
downloadrust-168b2d1a3f4569706fe4f9a2baee04e37f85d297.tar.gz
rust-168b2d1a3f4569706fe4f9a2baee04e37f85d297.zip
auto merge of #13496 : alexcrichton/rust/issue-13495, r=sfackler
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");