Skip to content

resolve: cleanup and groundwork for resolving the AST #33232

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

Merged
merged 9 commits into from
Apr 29, 2016

Conversation

jseyfried
Copy link
Contributor

Cleanup resolve and refactor away uses of the hir map (incorrectly named ast_map).
r? @nrc

@jseyfried
Copy link
Contributor Author

cc @petrochenkov

loop {
if node_ancestor == ancestor { return true }
let node_ancestor_parent = self.get_module_parent(node_ancestor);
if node_ancestor_parent == node_ancestor { return false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit: spread these ifs over three lines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@nrc
Copy link
Member

nrc commented Apr 27, 2016

Nice! r+ with the style nits addressed.

@jseyfried
Copy link
Contributor Author

@nrc thanks for the quick review! I addressed the style nits in the above commit.

let module_parent = match self.get_nearest_normal_module_parent(module) {
Some(parent) => parent,
None => return false,
};
module = module_parent;
}
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer true rather than return true;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and in the other function too

@jseyfried jseyfried force-pushed the resolve_ast_groundwork branch from 28a2f7e to ac26419 Compare April 28, 2016 03:46
@jseyfried
Copy link
Contributor Author

jseyfried commented Apr 28, 2016

@nrc

prefer true rather than return true;

Whoops -- didn't notice that when mechanically refactoring, fixed.

@jseyfried jseyfried closed this Apr 28, 2016
@jseyfried jseyfried reopened this Apr 28, 2016
@nrc
Copy link
Member

nrc commented Apr 28, 2016

@bors: r+

@bors
Copy link
Collaborator

bors commented Apr 28, 2016

📌 Commit ac26419 has been approved by nrc

@bors
Copy link
Collaborator

bors commented Apr 29, 2016

⌛ Testing commit ac26419 with merge cc1b031...

@bors
Copy link
Collaborator

bors commented Apr 29, 2016

💔 Test failed - auto-win-msvc-64-opt

@alexcrichton
Copy link
Member

@bors: retry

On Thu, Apr 28, 2016 at 11:34 PM, bors [email protected] wrote:

[image: 💔] Test failed - auto-win-msvc-64-opt
http://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt/builds/4010


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#33232 (comment)

@bors
Copy link
Collaborator

bors commented Apr 29, 2016

⌛ Testing commit ac26419 with merge b2bc29d...

@bors
Copy link
Collaborator

bors commented Apr 29, 2016

💔 Test failed - auto-mac-32-opt

@alexcrichton
Copy link
Member

@bors: retry

On Friday, April 29, 2016, bors [email protected] wrote:

[image: 💔] Test failed - auto-mac-32-opt
http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/8981


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#33232 (comment)

@bors
Copy link
Collaborator

bors commented Apr 29, 2016

⌛ Testing commit ac26419 with merge 8b1dcf4...

bors added a commit that referenced this pull request Apr 29, 2016
resolve: cleanup and groundwork for resolving the AST

Cleanup `resolve` and refactor away uses of the hir map (incorrectly named `ast_map`).
r? @nrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants