-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Implemented macro referencing for save analysis #31279
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -77,6 +77,10 @@ pub struct Session { | |||
/// available in this crate | |||
pub available_macros: RefCell<HashSet<Name>>, | |||
|
|||
/// Map from local spans for imported macros to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you be more explicit about what "local spans" are? And maybe a better name for the field is imported_macro_spans
dc5e4e2
to
317f16b
Compare
Change made |
@@ -70,6 +72,9 @@ pub struct DumpCsvVisitor<'l, 'tcx: 'l> { | |||
fmt: FmtStrs<'l, 'tcx>, | |||
|
|||
cur_scope: NodeId, | |||
|
|||
// Map of macro definition spans to the set of (known) callsite spans. | |||
mac_uses: HashMap<Span, Box<HashSet<Span>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the Box here?
317f16b
to
1d32641
Compare
Changes have been made. Hopefully that should be everything (let me know if you're happy with the use of span_bug for checking visit_mac) |
@bors: r+ |
📌 Commit 1d32641 has been approved by |
r? @nrc