Skip to content

function abs() is panicking on min_value #377

@spremel

Description

@spremel

The documentation states that abs(::MIN) returns ::MIN. However, the current behavior is to panic on integer min value.
This is easily reproducible on the stable Rust playground.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=447346fe7ffc16a8c46eb694f30138ac

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions