I think so. https://github.com/mozilla/rust/blob/master/src/librustc/middle/lang_items.rsemployes such a trick.
-Ed On Wed, Mar 26, 2014 at 3:42 AM, Ziad Hatahet <[email protected]> wrote: > Would a macro address this situation? > > -- > Ziad > > > On Mon, Mar 24, 2014 at 5:12 PM, comex <[email protected]> wrote: > >> On Mon, Mar 24, 2014 at 7:32 PM, Richo Healey <[email protected]> >> wrote: >> > let vec: [u8, .. FooBar::size()]; >> > >> > Potentially with parens ommittted, to convey that there's no runtime >> > computation? >> >> Not sure if it matters, but another thing one might want to use in a >> constant expression is sizeof, which wouldn't necessarily be amenable >> to a similar approach. >> _______________________________________________ >> Rust-dev mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/rust-dev >> > > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
