[rust-dev] Exporting macros: #[macro_escape] usage

Steven Fackler sfackler at gmail.com
Mon Jan 20 10:45:21 PST 2014


#[macro_export] exports macros from one crate to another (across an "extern
mod" boundary). It doesn't have any effect inside of the crate in which it
is defined.

Steven Fackler


On Sun, Jan 19, 2014 at 11:50 PM, Vladimir Matveev
<dpx.infinity at gmail.com>wrote:

> I thought so :)
> By the way, isn't one of the latest pull requests (the one about
> loadable syntax extensions) provide a solution to this problem? It has
> this particular snippet in its explanation:
>
> #[macro_export]
> macro_rules! exported_macro (() => (2))
>
> Which suggests that macros can now be exported.
>
>
> 2014/1/20 John Clements <clements at brinckerhoff.org>:
> >
> > On Jan 11, 2014, at 12:15 AM, Vladimir Matveev wrote:
> >
> >> Oh, thanks. It does work now. Are macro scoping rules documented
> >> somewhere except the compiler source code?
> >
> > As the author of the macro_escape hack: no, I don't believe it's
> documented.
> >
> > John Clements
> >
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140120/b072e414/attachment.html>


More information about the Rust-dev mailing list