Skip to content

Typecasting features #1084

@micahscopes

Description

@micahscopes

We need to implement some basic typecasting features, whether by introducing new syntax, adding some implicit casting or otherwise.

let x: u32 = 10
mymem[x] // err, expected usize
mymem[x as u64]
mymem[x.into()]
mymem[x as usize]

(motivated by conversation around #1083)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions