Disallow numeric casting in Monguard

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Monguard
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Using the "as" keyword to cast numbers in Rust can cause silent data loss between incompatible numeric types (e.g. usize -> i32). Monguard should lint for clippy::cast_possible_truncation, clippy::cast_possible_wrap, and clippy::cast_sign_loss to force callers to handle these conversions explicitly. See RUST-1881 and RUST-2127 for similar work in the Rust driver; it might be useful to vendor in the Checked type.

            Assignee:
            Unassigned
            Reporter:
            Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: