Skip to content

type limit comparisons should be conservative with respect to uint #6130

Closed
@nikomatsakis

Description

@nikomatsakis

The following code:

            assert!(v <= 0xFFFF_FFFF_u);

issues a warning on a 32-bit build but not a 64-bit build (because v is a uint). This is annoying. We should consider uint to be 64-bits for the purposes of this lint mode, which is inline with our general philosophy that you of segregating uint from u32 and u64 to encourage portability between 32-bit and 64-bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions