The problem is that, in practice, Rust code uses usize
mainly as the integer that we use to index a Vec
, and this the role of size_t
. There's unfortunately a mismatch between what's been defined (usize
as uintptr_t
) and what's used in practice. This has been discussed before.
I think the best to do is to admit the mistake and fix the definition of usize
. The reason this is possible is that this doesn't break any currently running code, since in all platforms Rust is currently supported, size_t
= uintptr_t