]> git.lizzy.rs Git - rust.git/commit
auto merge of #11720 : sfackler/rust/macro-export-source, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 24 Jan 2014 08:06:31 +0000 (00:06 -0800)
committerbors <bors@rust-lang.org>
Fri, 24 Jan 2014 08:06:31 +0000 (00:06 -0800)
commit4ce84fa1ded0b347e39f8f0830086f19a9cd720a
treede019383668ca5a2c882680c4332c57c6b811bed
parentcd8ee786f98352e78d9688948d3d0a325f45bb2d
parentd908e97da34ecc419024ddcf5004033920ebb9a9
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.
src/librustc/metadata/csearch.rs
src/librustpkg/util.rs
src/libsyntax/ext/base.rs