rust-lang / reference

The Rust Reference
https://doc.rust-lang.org/nightly/reference/
Apache License 2.0
1.25k stars 491 forks source link

Add `expr_2021` macro fragment specifier #1580

Closed ehuss closed 1 month ago

ehuss commented 3 months ago

Draft pending stabilization of 2024.

Tracking issue: https://github.com/rust-lang/rust/issues/123742

mattheww commented 3 months ago

Does macro-ambiguity.md need updating for this sort of change?

Eg should this line:

  * FOLLOW(expr) = FOLLOW(stmt) =  {`=>`, `,`, `;`}`.

now list FOLLOW(expr_2021) too?

ehuss commented 3 months ago

@mattheww Are you suggesting it should be this?

-  * FOLLOW(expr) = FOLLOW(stmt) =  {`=>`, `,`, `;`}`.
+  * FOLLOW(expr) = FOLLOW(expr_2021) = FOLLOW(stmt) =  {`=>`, `,`, `;`}`.
mattheww commented 3 months ago

Yes, I think that's how it works.

ehuss commented 3 months ago

Thanks! Yea, that makes sense to me.

ehuss commented 1 month ago

Merging now that https://github.com/rust-lang/rust/pull/129972 has stabilized.