Pre-RFC: `bounds` macro matcher
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
There is currently no sane way to match trait bounds in macros. To my knowledge, $a:path is the closest you can get, and that does not match 'static or other lifetimes.
The easiest answer to this is to add a $a:bounds matcher that matches trait bounds specifically. For example:
- It would match
Sync - It would match
'static - It would match
Sync + Send + 'static
Then, accepting trait bounds in macros would be as '''simple''' as something like $(<$($bound_lt:lifetime),* $(,)? $($bound_p:ident: $bound_p_bound:bounds),* $(,)?>)? instead of complete insanity.
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
The issue names no files, tests, or entry points; start by reviewing the proposed bounds matcher examples and the existing macro matcher behavior they compare against. Done would be a decided RFC design that specifies which trait bounds are accepted and how the matcher behaves for the listed cases.
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
- 35/100