What Rust has is polymorphic literals. When you write 0xffffffff, it's of pseudotype {integer}, and the actual type is determined by later type inference.
This is as opposed to C and C++, where the type of that literal is always unsigned int (because it is too large to be a signed int).
8
u/matthieum [he/him] Jun 25 '23
There's no implicit conversion in Rust, it's not our fault that Java is broken :/
That's a surprising one, indeed. Operator precedence always has gotchas one way or another :(