[rust-dev] read_byte and sentinel values

Matthieu Monrocq matthieu.monrocq at gmail.com
Wed Jul 24 09:51:03 PDT 2013


It could be.

If it is not, it may be that Option needs some love at the CodeGen level to
make it so :)

-- Matthieu.


On Wed, Jul 24, 2013 at 6:46 PM, Corey Richardson <corey at octayn.net> wrote:

> On Wed, Jul 24, 2013 at 12:42 PM, Matthieu Monrocq
> <matthieu.monrocq at gmail.com> wrote:
> > Given that all values of u8 are meanginful, there is no space for an
> extra
> > bit, so it is no surprise that it cannot be packed.
> >
> > For pointers, for example, it is typical to exploit the fact that the
> null
> > pointer is a meaningless value and thus rely on this sentinel value to
> > encode the absence of value, but in general this is only possible if
> such a
> > sentinel value is possible to begin with.
> >
>
> I would expect it to be backed into a u16.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20130724/eb237764/attachment-0001.html>


More information about the Rust-dev mailing list