Skip to content

i32 -> u32 conversion described as "no-op" #261

@jgarvin

Description

@jgarvin

From here: https://doc.rust-lang.org/nomicon/casts.html

casting between two integers of the same size (e.g. i32 -> u32) is a no-op

A signed integer can contain values an unsigned integer cannot, so even if this is true at the instruction level it seems misleading. Should maybe mention if Rust assumes 2s-complement representation?

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