Macro to resolve type of field
Open
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
A macro that expands into the type of a field in a struct.
struct Foo {
bar: Bar,
}
fn make_foo(bar: field_type!(Foo, bar)) -> Foo {
Foo { bar }
}
I thought this is a common use case for macro libraries, but I can't find any RFCs that have discussed on this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed field_type!(Foo, bar) expansion and review the Rust RFC process and related macro or type-system proposals. Done means defining the semantics and limitations of resolving a struct field's type and documenting a complete RFC proposal with its open questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100