Adds missing isize and usize as valid options
GCC Rust now correctly recognizes `isize` and `usize` as valid integer types in expression type checking.
This commit updates GCC Rust’s expression type checker to include isize and usize as valid options. Previously, these fundamental Rust integer types might have been missing from certain checks, potentially leading to errors or incorrect type inference. This ensures proper handling of these types in various expression contexts.
In Details
The TypeCheckExpr::visit method in gccrs has been updated to include isize and usize in its set of recognized valid integer types. This correction ensures that these primitive pointer-sized integer types are correctly handled during expression type checking, preventing potential issues in scenarios where they are used.
- isize
- A signed integer type in Rust whose size is the same as a pointer on the target architecture. It's often used for indexing or calculations involving memory addresses.
- usize
- An unsigned integer type in Rust whose size is the same as a pointer on the target architecture. It's commonly used for sizes, counts, and memory indexing.
- expression type checking
- The process by which the compiler verifies that the types used in an expression are compatible and that operations are valid for those types.