Skip to content

The parser should use some kind of hygiene or lang item for FullRange #20516

Closed
@nrc

Description

@nrc

The parser currently assumes there is a struct called FullRange in scope in order to desugar full slices (&expr[] -> &expr[FullRange]). This is a problem if there is no prelude (where FullRange is defined).

We already have a lang item for FullRange, but unfortunately lang items can only be used from the compiler proper, not from libsyntax. The ideal solution is to fix that. Shorter term we might want to allow a full path to be specified via a macro or something, so we can be a bit more hygenic here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions