Skip to content

Do we commit to supporting "0 as T*" to express null const expression? #4671

@jdm

Description

@jdm

Original title: "Can't use null unsafe pointers in const expressions"

We can't use ptr::null(), since that requires a function call. There's nothing castable, even with #4531 fixed. Maybe we could allow casting literal zero to unsafe pointer types?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions