External Publication
Visit Post

Crowdsourcing request: What syntax changes that will affect the AST are currently in flight?

Rust Internals [Unofficial] May 30, 2026
Source

looking through recent commits to rustc_parse:

github.com/rust-lang/rust

Parse mut restrictions

committed 08:33AM - 24 May 26 UTC

      CoCo-Japan-pan
    

+124 -47

github.com/rust-lang/rust

add move(expr) syntax

committed 01:22PM - 07 May 26 UTC

      TaKO8Ki
    

+77 -4

github.com/rust-lang/rust

Parse view type syntax, mark it as unstable

committed 06:11PM - 29 Apr 26 UTC

      scrabsha
    

+45 -40

github.com/rust-lang/rust

Reorder keywords to place restrictions next to visibility

committed 06:57AM - 19 Apr 26 UTC

      CoCo-Japan-pan
    

+49 -73

github.com/rust-lang/rust

Parse and lower final for methods

committed 07:12AM - 12 Feb 26 UTC

      mu001999
    

+142 -43

Co-authored-by: Michael Goulet michael@errs.io

github.com/rust-lang/rust

Allow provisional mgca syntax of type const = to be reconized.

committed 03:59PM - 09 Feb 26 UTC

      Keith-Cancel
    

+1014 -906

Revert, but without type const. Update symbol for feature err, then update sugg…estion output, and lastly update tests that change because of those. Update these new tests with the correct syntax, and few existing tests with the new outputs the merge with main added. Fix for tidyfmt and some errors when manually resolving a merge conflicts. Update these tests to use update error messages and type const syntax. Update comments and error message to use new syntax instead of old type_const attribute. Remove the type_const attribute update some more tests to use the new syntax. Update these test cases. update feature gate test Change gate logic for mgca_type_const_syntax to work also if min_generic_const_args is enabled. Create a new feature gate that checks for the feature before expansion. Make rustfmt handle the type const syntax correctly. Add a convience method to check if a RhsKind is type const. Rename Const discriminant to Body for ConstItemRhsKind Give the TraitItemKind flag an enum instead of a simple bool to better describe what the flag is for. Update formatting for these match statements. Update clippy test to use type const syntax. Update test to use type const syntax. update rustfmt to match ast items. Update clippy to match ast and hir items. Few more test cases that used old attribute, instead of 'type const' Update to match the output from the feature gate checks. tidyfmt adjustments. Update the is_type_const, so I can constrain record!(..) in encoder.rs Update conditional compilation test. Move the feature gate to after expansion to allow for cfg(...) to work. Update some more tests to use the new syntax. Update type const tests in associated-const-bindings to use new syntax. Don't check based off the attribute, but the item here. Update some tests outside of the const_generics folder that were using #[type_const] update the tests in associated consts that use #[type_const] to use type const Update these mgca tests with the type const syntax. Add a flag to TraitItemKind for detecting type const for now. Maybe later change ItemConstRhs to have optional consts but that touches a lot more lines of code. Don't need into for these now that it's a query. Add is_type_const query to handle foreign def ids. update this test to use type const syntax. Fix logic here, we only want to lower if there is expression in this case. Update built-in macros to use ConstItemRhsKind Update more instance of the old ConstItemRhs. Rename ConstItemKind to ConstItemRhsKind, I noticed there is a typed called ConstantItemKind, so add the Rhs to the name to avoid confusion. Update lower to use ConstItemKind Add an other helper method to check if the rhs kinda has an expr. Update item parse to use ConstItemKind enum. Felt the field name could a be little clear when editing a few other things. Change the ConstItem struct see know if we have a type const or regular const. Make sure this syntax is properly feature gated.

github.com/rust-lang/rust

fix(parser): Disallow CR in frontmatter

committed 07:01PM - 28 Jan 26 UTC

      epage
    

+27 -4

T-lang came back on the stabilization PR asking for CR to be disallowed to leave… room for all stray CRs to be rejected in the future. At that point, the test can remain but the implementation can be removed. If that plan does not go through, we'll need to re-evaluate - whether this is more lint-like and should defer to the calling tool that is managing the frontmatter - how much Rust should treat the frontmatter as Rust and apply the same grammar restrictions of "no stray CR" (like raw string literals)

github.com/rust-lang/rust

Sugar for const _: () =

committed 03:12PM - 21 Jan 26 UTC

      GrigorenkoPV
    

+116 -29

github.com/rust-lang/rust

Feature-gate mut ref patterns in struct field shorthand.

committed 04:46AM - 14 Jan 26 UTC

      zachs18
    

+18 -2

github.com/rust-lang/rust

Support syntax for one-line trait reuse

committed 07:34AM - 23 Dec 25 UTC

      aerooneqq
    

+879 -33

github.com/rust-lang/rust

Experimentally add heterogeneous try blocks

committed 04:18AM - 10 Dec 25 UTC

      scottmcm
    

+278 -59

148725 moved the default to being homogeneous; this adds heterogeneous ones back… under an obvious-bikeshed syntax so people can experiment with that as well. Essentially resolves 149025 by letting them move to this syntax instead.

github.com/rust-lang/rust

Allow inherent const impl blocks

committed 04:00PM - 18 Nov 25 UTC

      oli-obk
    

+78 -86

github.com/rust-lang/rust

Implement &pin patterns and ref pin bindings

committed 01:57AM - 10 Nov 25 UTC

      frank-king
    

+886 -240

github.com/rust-lang/rust

Add not-null pointer patterns to pattern types

committed 11:22AM - 21 Oct 25 UTC

      oli-obk
    

+353 -22

github.com/rust-lang/rust

Gate static coroutines behind a parser feature

committed 01:12PM - 19 Aug 25 UTC

      compiler-errors
    

+67 -24

github.com/rust-lang/rust

Change const trait bound syntax from ~const to [const]

committed 01:46PM - 26 Jun 25 UTC

      oli-obk
    

+1382 -1319

github.com/rust-lang/rust

Implement RFC 3503: frontmatters

committed 03:10PM - 05 May 25 UTC

      fee1-dead
    

+970 -22

Supercedes #137193

Discussion in the ATmosphere

Loading comments...