Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This does two things. 1. Integer types no longer automatically cast to each other. Methods such as `as_u64` and `try_as_u8` have been introduced to require the user to explicit the cast. Warnings about casts losing precision have been removed as they are no longer possible. 2. Numeric literals (such as `32` without further qualifications) no longer immediately decay to a `u64` and we instead attempt to type them as `TypeInfo::Numeric` as far as possible to allow their usage with any integer type. Numeric intrinsics unify arguments with the numeric type to enforce their constraints. Numeric values are forced to decay to `u64` when resolving methods or traits. This change is a prerequisite to move our representation of sub-byte-sized values to a different memory representation, as numeric types need to be distinct if we are ever to treat them differently.
- Loading branch information