From e163ab215105753fd4e9b60a3786ff4636a0c3ff Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 13 Apr 2014 11:26:43 -0700 Subject: 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 --- src/libsyntax/ext/registrar.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/libsyntax') 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 { + krate: &ast::Crate) -> Option { 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"); -- cgit 1.4.1-3-g733a5