GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
As the title suggests: a couple of useful methods for proc_macro.
(rust_highfive has picked a reviewer for you, use r? to override)
Yes, of course. I'll add some ui-tests as well.
Alternative naming idea: parent -> source, source -> original_source. parent sounds a little strange to me w.r.t. spans. I don't have a super strong opinion though.
Add 'Span.parent()' and 'Span.source()' to proc_macro API.
Added tests and fixed up the definition. I don't have a strong opinion about naming. parent simply felt more natural to me as I'm "moving up the chain".
@jseyfried Look okay?
Yeah, let's land. @bors r+
📌 Commit ab365be has been approved by jseyfried
⌛️ Testing commit ab365be with merge a9a03d9...
Auto merge of #47099 - SergioBenitez:master, r=jseyfried
Add 'Span::parent()' and 'Span::source()' to proc_macro API.
As the title suggests: a couple of useful methods for `proc_macro`.
☀️ Test successful - status-appveyor, status-travis
Approved by: jseyfried
Pushing a9a03d9 to master...