Skip to content

Implement checks for unchecked_* operations #646

@celinval

Description

@celinval

Requested feature: RMC should detect failures when dealing with unchecked arithmetic operations.
Use case: Unchecked arithmetic operations assume that the operands respect some invariant. If they don't, the result has an undefined behavior. We should add checks to verify that all the invariants are respected.
Link to relevant documentation (Rust reference, Nomicon, RFC):
https://doc.rust-lang.org/std/primitive.u32.html
https://doc.rust-lang.org/std/primitive.i32.html
https://doc.rust-lang.org/std/primitive.f32.html#method.to_int_unchecked

Is this a breaking change? No

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] Feature / EnhancementA new feature request or enhancement to an existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions