-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Perform name resolution before and during ast->hir lowering #33443
Conversation
} else { | ||
self.visit_block(block); | ||
} | ||
|
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.
can you factor out this code dup?
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.
Done
A few comments inline (some of which GitHub seems to be hiding due to already being out of date some how). r=me with those addressed. |
What purpose of it? |
@KalitaAlexey
|
@jseyfried Thanks. |
// We must keep the set of definitions up to date as we add nodes that weren't in the AST. | ||
fn definitions(&mut self) -> &mut Definitions; | ||
// This should only return `None` during testing. | ||
fn definitions(&mut self) -> Option<&mut Definitions>; |
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.
I could further refactor this into local_def_id
(which would return a dummy DefId
during testing) and crate_def_with_parent
(which would do nothing during testing).
46d0fb8
to
6ebe69c
Compare
☔ The latest upstream changes (presumably #33091) made this pull request unmergeable. Please resolve the merge conflicts. |
8b5bd6c
to
e4f56e5
Compare
@nrc I finally finished rebasing and fixing fallout in tests and rustdoc. Could you review the last three commits? |
@bors: r+ |
📌 Commit 805666a has been approved by |
⌛ Testing commit 805666a with merge a4d2424... |
Perform name resolution before and during ast->hir lowering This PR performs name resolution before and during ast->hir lowering instead of in phase 3. r? @nrc
This PR performs name resolution before and during ast->hir lowering instead of in phase 3.
r? @nrc