[rust-dev] Building a static array of pointers

Simon Sapin simon.sapin at exyr.org
Sat Apr 5 06:07:22 PDT 2014


On 05/04/2014 12:00, Corey Richardson wrote:
> A C-style array is written `*T`, much like in C (note: I'm not saying
> `T*` and `T[]` are the same type, I know they aren't)

*T in Rust is not an array, it is a raw pointer. It may happen to point 
to the start of an array that you could unsafely access with .offset() 
and ptr::read(), but you can not index it like an array.

-- 
Simon Sapin


More information about the Rust-dev mailing list