[rust-dev] PSA: ~"string" is probably not what you want

Graydon Hoare graydon at mozilla.com
Tue Apr 30 14:15:56 PDT 2013

On 30/04/2013 2:03 PM, Vadim wrote:
> Hi Graydon,
> How does Rust currently represent its' pointers to vectors?  Based on
> what I've seen in the library, it seems that ~[T] and @[T] are plain
> pointers (with size stored in the pointee), but &[T] is a fat pointer,
> i.e. a (ptr,len) pair.  Is this correct?

Correct. And [T, ..N] is N copies of T laid out in memory as a 
not-pointer-indirect value.


More information about the Rust-dev mailing list