dtolnay / dtolnay/syn

Parse mut-restricted field syntax

Open
#1,987 0 comments 0 reactions 0 assignees View on GitHub
syntax
Dominant language
Rust
Stars
3.4k
Forks
374
Avg merge
1d 5h
Merged PRs (30d)
2

Description

- Part of https://github.com/rust-lang/rust/issues/105077

Example: https://github.com/rust-lang/rust/blob/d39561c2d2b55985d3b6331cc52403e038e7fc8b/tests/pretty/hir-mut-restriction.rs#L7

```rust
struct FooS {
pub(crate) mut(crate) x: i32,
mut(self) unsafe y: i32,
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Rust issue linked in the body and the syntax example in tests/pretty/hir-mut-restriction.rs, especially the mut-restricted fields shown there. Trace how syn parses struct fields and add support for these forms; done means the example syntax parses successfully and existing parsing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.