Skip to content

RFC 3101 reserved prefixes #601

Description

@mattheww

RFC 3101 (rust-lang/rfcs#3101) reserves lexical forms like the following:

  • ident#foo
  • ident"foo"
  • ident'f'
  • ident#123

This isn't covered in the FLS.

They're reserved in the 2021 edition and later, and the FLS currently describes the 2021 edition.

rust-lang/rust#126452 extended the RFC to reserving forms like

  • 'ident#foo

Here, "reserves" means that it's a lexing-time error if any of those forms appear.

These are covered in the Reference under lex.token.reserved-prefix. That models them as separate forms of token, using grammar productions which don't overlap with the productions for accepted tokens.

There is some discussion of this approach in rust-lang/reference#1128.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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