Skip to content

Tracking issue for wrapping stabilization #27755

Closed
@aturon

Description

@aturon

The std::num::wrapping module provides a trait, OverflowingOps, that permits overflowing arithmetic on primitive types and tells whether an overflow occurred.

Other methods, like saturating_add and wrapping_add, are included directly as inherent methods on these types.

It's not clear whether the overflowing_foo methods are useful, and if so, whether there's any reason for them to live on a trait. Ideally, if we kept them, they'd move onto the primitive types, and the wrapping module would be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions