Skip to content

Conversation

yyny
Copy link
Contributor

@yyny yyny commented Oct 7, 2025

The grammar for ConstParam in https://doc.rust-lang.org/reference/items/generics.html#grammar-ConstParam was specified as:

ConstParam →
    'const' IDENTIFIER : Type
    ( '=' BlockExpression | IDENTIFIER | '-'? LiteralExpression )?

This implies that IDENTIFIER and '-'? LiteralExpression may not be preceded by =, but this is obviously not the case.

The grammar for `ConstParam` in https://doc.rust-lang.org/reference/items/generics.html#grammar-ConstParam was specified as:

```grammar
ConstParam →
    'const' IDENTIFIER : Type
    ( '=' BlockExpression | IDENTIFIER | '-'? LiteralExpression )?
```

This implies that `IDENTIFIER` and `'-'? LiteralExpression` may not be preceded by `=`, but this is obviously not the case.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 7, 2025
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss added this pull request to the merge queue Oct 7, 2025
Merged via the queue into rust-lang:master with commit a3ee4b9 Oct 7, 2025
5 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 7, 2025
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