Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upWIP: goto defenition inside macro_rules macro #724
Conversation
This comment has been minimized.
This comment has been minimized.
|
|
matklad
force-pushed the
res-macros
branch
from
036e50d
to
719d38c
Feb 1, 2019
matklad
added some commits
Feb 1, 2019
matklad
force-pushed the
res-macros
branch
from
bba3714
to
bcd552f
Feb 1, 2019
DJMcNab
reviewed
Feb 1, 2019
| @@ -169,4 +169,71 @@ impl_froms!(TokenTree: Leaf, Subtree); | |||
| Some(TextRange::from_to(23.into(), 32.into())), | |||
| ) | |||
| } | |||
|
|
|||
| #[test] | |||
| fn dont_die_on_serde() { | |||
This comment has been minimized.
This comment has been minimized.
DJMcNab
Feb 1, 2019
Contributor
It probably doesn't matter, but we should make some callback to serde's license.
This comment has been minimized.
This comment has been minimized.
matklad
Feb 1, 2019
•
Author
Collaborator
Not a lawyer, but MIT LICENSE says:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
I believe this not a substantial portion :)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Closing, as this should be done in a more principaled way |
matklad
closed this
Feb 22, 2019
matklad
deleted the
res-macros
branch
Mar 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
matklad commentedFeb 1, 2019
This uses #719 to actually implement a user-visible feature. Goto declaration works inside a macro_rules macro (see this test).
That's pretty cool except for the fact that, when I try to actually use this branch, rust-analyzer kills my system by consuming all the ram :)
A most important API change here is that we start assigning ids to TokenStream tokens.
Now token has not only a value, but an identity as well, which we currently use to map offsets, but which should also work for hygiene.