Skip to content

Remove RESERVED_NUMBER#2193

Merged
traviscross merged 2 commits intorust-lang:masterfrom
ehuss:remove-reserved-number
Mar 1, 2026
Merged

Remove RESERVED_NUMBER#2193
traviscross merged 2 commits intorust-lang:masterfrom
ehuss:remove-reserved-number

Conversation

@ehuss
Copy link
Contributor

@ehuss ehuss commented Feb 25, 2026

This removes RESERVED_NUMBER and instead embeds the correctness requirements for a number in the literal productions using the cut operator.

I like the idea of inlining these requirements into the grammar so that the restrictions are clear and nearer to the rules they are related to.

I'm on the fence about keeping the rules describing the restrictions. In general we don't want to describe the grammar in English due to the potential ambiguity. If we do this here, why wouldn't we do this everywhere there is a cut operator? However, I think it's still helpful to include in this case.

SUFFIX_NO_E is no longer needed because all of the other rules handle rejecting the E.

This removes RESERVED_NUMBER and instead embeds the correctness
requirements for a number in the literal productions using the cut
operator.

I like the idea of inlining these requirements into the grammar so that
the restrictions are clear and nearer to the rules they are related to.

I'm on the fence about keeping the rules describing the restrictions. In
general we don't want to describe the grammar in English due to the
potential ambiguity. If we do this here, why wouldn't we do this
everywhere there is a cut operator? However, I think it's still helpful
to include in this case.

SUFFIX_NO_E is no longer needed because all of the other rules handle
rejecting the E.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Feb 25, 2026
Let's make some revisions on and around the revised text to follow our
editorial direction and to remove some stray newlines.
@traviscross
Copy link
Contributor

Looks good. Thanks.

@traviscross traviscross enabled auto-merge March 1, 2026 06:33
@traviscross traviscross added this pull request to the merge queue Mar 1, 2026
Merged via the queue into rust-lang:master with commit 0a1928e Mar 1, 2026
6 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants