Skip to content

Parse mut restrictions and unsafe fields in FieldModifiers - #2091

Open
jhpratt wants to merge 1 commit into
dtolnay:masterfrom
jhpratt:master
Open

jhpratt wants to merge 1 commit into
dtolnay:masterfrom
jhpratt:master

Conversation

@jhpratt

@jhpratt jhpratt commented Nov 13, 2026

Copy link
Copy Markdown

This is needed for something I'm trying to do upstream in rustc, although that'll necessitate bumping syn up to v3 as well.

closes #1792
closes #1987

@jhpratt

jhpratt commented Nov 13, 2026

Copy link
Copy Markdown
Author

The test failure is about box patterns being removed in favor of deref patterns, so that's wholly unrelated. I also see something about let chains in older editions, which I definitely didn't touch.

@dtolnay

dtolnay commented Nov 17, 2026

Copy link
Copy Markdown
Owner

The test failure is because this breaks parsing unsafe binders in a tuple struct, which previously used to work. rust-lang/rust#130516

error: at least one trait is required for an object type
 --> dev/main.rs:4:19
  |
4 | struct Bar(unsafe<'a> &'a ());
  |                   ^^

@jhpratt

jhpratt commented Nov 17, 2026

Copy link
Copy Markdown
Author

CI is green.

This branch has not been deployed

No deployments
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.

Parse mut-restricted field syntax Parse unsafe fields

2 participants