about summary refs log tree commit diff
path: root/src/libsyntax/ext/base.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-24 00:06:31 -0800
committerbors <bors@rust-lang.org>2014-01-24 00:06:31 -0800
commit4ce84fa1ded0b347e39f8f0830086f19a9cd720a (patch)
treede019383668ca5a2c882680c4332c57c6b811bed /src/libsyntax/ext/base.rs
parentcd8ee786f98352e78d9688948d3d0a325f45bb2d (diff)
parentd908e97da34ecc419024ddcf5004033920ebb9a9 (diff)
downloadrust-4ce84fa1ded0b347e39f8f0830086f19a9cd720a.tar.gz
rust-4ce84fa1ded0b347e39f8f0830086f19a9cd720a.zip
auto merge of #11720 : sfackler/rust/macro-export-source, r=alexcrichton
The old method of serializing the AST gives totally bogus spans if the
expansion of an imported macro causes compilation errors. The best
solution seems to be to serialize the actual textual macro definition
and load it the same way the std-macros are. I'm not totally confident
that getting the source from the CodeMap will always do the right thing,
but it seems to work in simple cases.
Diffstat (limited to 'src/libsyntax/ext/base.rs')
-rw-r--r--src/libsyntax/ext/base.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index a6ad7b2a550..2c817365390 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -299,7 +299,7 @@ pub struct MacroCrate {
 
 pub trait CrateLoader {
     fn load_crate(&mut self, crate: &ast::ViewItem) -> MacroCrate;
-    fn get_exported_macros(&mut self, crate_num: ast::CrateNum) -> ~[@ast::Item];
+    fn get_exported_macros(&mut self, crate_num: ast::CrateNum) -> ~[~str];
     fn get_registrar_symbol(&mut self, crate_num: ast::CrateNum) -> Option<~str>;
 }