Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro fragment fields #3714

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a2fc4ac
Macro fragment fields
joshtriplett Oct 15, 2024
1edb079
RFC 3714
joshtriplett Oct 21, 2024
7fc82cd
Improve spans for fields without corresponding tokens
joshtriplett Oct 21, 2024
bbb2dd0
Rephrase some future work
joshtriplett Oct 22, 2024
195f8a9
Rephrase explanation of using fragment fields
joshtriplett Oct 22, 2024
5d002f4
Define `param` using repetition, to allow users more flexibility with…
joshtriplett Oct 22, 2024
3e14949
Clarify that `:fn` is a definition, including a body
joshtriplett Oct 22, 2024
b032d5e
Future work: function declarations
joshtriplett Oct 22, 2024
df73c45
Add more future possibilities
joshtriplett Oct 22, 2024
d6a5314
Fix example
joshtriplett Oct 24, 2024
d0ba412
Future possibilities: function qualifiers like `const` and `async`
joshtriplett Oct 24, 2024
271c9c4
Hedge a future possibility further
joshtriplett Oct 24, 2024
62bf518
Expand on possible future handling of `param`
joshtriplett Oct 24, 2024
aacf8ba
Note that adding new fields to an existing matcher is forward-compatible
joshtriplett Oct 24, 2024
2da9937
Add `vis` for `:adt`
joshtriplett Oct 24, 2024
69a2c9a
Discuss synthesis of tokens for fields
joshtriplett Oct 24, 2024
37893b4
Future possibilities: add speculations about conditionally available …
joshtriplett Oct 24, 2024
39f750c
More speculative future possibilities
joshtriplett Nov 12, 2024
2c885c1
Link RFC
joshtriplett Nov 12, 2024
3980897
Word-wrap after merging suggestion
joshtriplett Nov 12, 2024
935694c
Link RFC in more places
joshtriplett Nov 12, 2024
cb7570a
Fix typo
joshtriplett Nov 20, 2024
185b841
More future possibilities
joshtriplett Nov 20, 2024
225773b
Add unresolved question about `return_type`
joshtriplett Nov 20, 2024
0ea7ea9
Future possibility: handle structs and tuples uniformly
joshtriplett Nov 20, 2024
1041307
Add unresolved question about process and delegation
joshtriplett Dec 2, 2024
bf3dca0
Wording tweak
joshtriplett Dec 2, 2024
a2f14ab
Add backquotes to clarify the type of `body`
joshtriplett Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Expand on possible future handling of param
  • Loading branch information
joshtriplett committed Oct 24, 2024
commit 62bf518ab15c5f9ebacc12132803279a615f0035
4 changes: 3 additions & 1 deletion text/3714-macro-fragment-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ Some examples of *possible* fields, to be evaluated in the future:

Some examples of *possible* additional fragment specifiers, to be evaluated in
the future:
- `param` for a single function parameter.
- `param` for a single function parameter, with fields for the pattern and the
type. (This would also need to handle cases like `...` in variadic functions,
and cases like `self`, perhaps by acting as if it was `self: Self`.)
- `field` for a single field of a `struct`, `union`, or struct-style enum
variant.
- `variant` for a single variant of an `enum`
Expand Down