Open Rua opened 3 weeks ago
Judging by the behaviour of Rust in this playground, these casts are treated the same as int-to-int casts, where the pointer is considered equivalent to usize. Casting i32 to usize will sign extend, casting usize to i128 will zero extend.
usize
i32
i128
Judging by the behaviour of Rust in this playground, these casts are treated the same as int-to-int casts, where the pointer is considered equivalent to
usize
. Castingi32
tousize
will sign extend, castingusize
toi128
will zero extend.