Skip to content

change mutable reference syntax to &'a mut T - #433

Merged
nikomatsakis merged 1 commit into
rust-lang:mainfrom
RaphiMuehlbacher:refmut-lifetime-syntax
Jul 15, 2026
Merged

change mutable reference syntax to &'a mut T#433
nikomatsakis merged 1 commit into
rust-lang:mainfrom
RaphiMuehlbacher:refmut-lifetime-syntax

Conversation

@RaphiMuehlbacher

@RaphiMuehlbacher RaphiMuehlbacher commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Closes #426

How does it work, what questions do you have?

I changed the order of how the variant RefMut gets parsed by parsing the keyword mut after the lifetime (&'a mut T instead of &mut 'a T). Additionally I changed the debug representation of RefMut so that it matches the new syntax. Also updated all affected tests to reflect the new syntax.

AI disclosure

  • I did not use any AI tools

@rustbot

rustbot commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks for contributing to formality! :)
A reviewer will take a look at your PR within a week or two. If not, come talk to us on https://rust-lang.zulipchat.com/#narrow/channel/402470-t-types.2Fformality

@nikomatsakis
nikomatsakis added this pull request to the merge queue Jul 15, 2026
Merged via the queue into rust-lang:main with commit 1a88659 Jul 15, 2026
4 checks passed
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.

Fix &mut reference type syntax to match Rust (&'a mut T)

3 participants