Skip to content

libsyntax: Name can be made NonZero #28657

Closed
@petrochenkov

Description

@petrochenkov

Spawned from #28642

Name is an index into the string interner's internal array. The first element of this array can be reserved and Name will always contain non-zero index. It will make Option<Name> and Option<Ident> commonly encountered in AST/HIR more compact.
Requires const unsafe functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions